dreamhost 上的 SSH 密钥

2024-04-10

我正在尝试设置与 dreamhost 和我的本地计算机配对的 SSH 密钥。我使用 git bash 作为我的终端(使用 mingw32)

我可以通过 ssh[电子邮件受保护] /cdn-cgi/l/email-protection并要求我提供密码。我已经在本地和共享 dreamhost 服务器上创建了 RSA 密钥。以下是我在 git 终端上执行的步骤:

$ scp ~/.ssh/id_rsa.pub [email protected] /cdn-cgi/l/email-protection:~/

$ ssh [email protected] /cdn-cgi/l/email-protection
[email protected] /cdn-cgi/l/email-protection's password: *****
$ (ls shows my local's id_rsa.pub in the ~ directory)
$ cd ~/.ssh
$ ls
id_rsa id_rsa.pub key_backup
$ cat ./id_rsa.pub >> authorized_keys (i know I could have just copied)
$ ls
authorized_keys id_rsa id_rsa.pub key_backup

vi authorized_keys shows my local's pubkey

$ chmod go-w ~
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys

然后我退出 ssh 连接并输入 ssh[电子邮件受保护] /cdn-cgi/l/email-protection进入我的本地 shell

并要求我输入密码......我在这里做错了什么?

我需要设置 ssh-agent 吗?当我这样做时,并尝试 ssh-add 我得到“无法打开与您的身份验证代理的连接”

谢谢你的帮助!

编辑:这是 ssh -v 的转储

$ ssh -v [email protected] /cdn-cgi/l/email-protection
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug1: Connecting to mysharedserver.com [xxx.xxx.xxx.xx] port 22.
debug1: Connection established.
debug1: identity file /c/Users/User/.ssh/identity type -1
debug1: identity file /c/Users/User/.ssh/id_rsa type 1
debug1: identity file /c/Users/User/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.1p1 Debia
n-5
debug1: match: OpenSSH_5.1p1 Debian-5 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.6
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'mysharedserver.com' is known and matches the RSA host key.
debug1: Found key in /c/Users/User/.ssh/known_hosts:2
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /c/Users/User/.ssh/identity
debug1: Offering public key: /c/Users/User/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /c/Users/User/.ssh/id_dsa
debug1: Next authentication method: password
[email protected] /cdn-cgi/l/email-protection's password:

我最近也有类似的问题。检查服务器上的权限:

  • ~/(整个主目录)对于组和其他人来说为 755 或更低 - 这对我来说是问题的原因我有 765
  • 〜/ .ssh 700
  • 〜/.ssh/authorized_keys 600

Update:

encryptfs 也可能存在问题,详细信息如下:https://serverfault.com/questions/310827/ssh-prompts-for-password-even-though-private-keys-are-available-presented-to-se/310829#310829 https://serverfault.com/questions/310827/ssh-prompts-for-password-even-though-private-keys-are-available-presented-to-se/310829#310829

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

dreamhost 上的 SSH 密钥 的相关文章

随机推荐

  • ScrollView 中的 ViewPager

    我需要有一个ViewPager里面一个ScrollView but ViewPager只是在进入时不会出现ScrollView 当我不使用时一切正常ScrollView 我在 stackoverflow 或其他网站上看到了一些类似的问题 所
  • BASH:如何在循环中创建动态数组名称

    这是我尝试过的 n 0 for i in aaa bbb ccc do array i n date N n done n 0 for i in aaa bbb ccc do echo array i n n done 有什么想法如何使动态
  • 找不到命名空间错误

    我有以下设置 enums ts export enum DocumentType Email 0 Unknown 1 remote ts
  • 用 C 语言实现 FIFO 队列

    对于嵌入式应用程序 我尝试使用 ANSI C 实现先进先出 FIFO 结构队列 最直接的方法似乎是通过实现链表 以便每个结构包含指向队列中下一个的指针 因此我将结构本身定义为 typedef enum LED on LED off etc
  • 错误:尝试使用 id==grid1 注册小部件,但该 id 已注册

    我目前正在开发我的个人网站我对我的网站的一部分有一个偏见 即避免重复代码 这个视图我有一个 dojox grid datagrid 我可以在同一页面中调用此视图两次 ruban phtml 问题是我单击 1 个按钮 这是该视图 部分视图 的
  • 如何在Matlab中找到连通分量?

    数组A 2 3 2 5 4 8 5 6 7 8 我想得到的结果为 conidx 2 3 5 6 和 4 7 8 2 3 的值之一存在于第二行 2 5 的值之一存在于第 4 行 因此 2 3 2 5 和 5 6 连接起来 最后我可以得到连接索
  • 打字稿错误“无法写入文件...因为它会覆盖输入文件。”

    在 Visual Studio 2015 Update 3 中的 Typescript 2 2 1 项目中 我在错误列表中收到数百个错误 例如 无法写入文件 C my project node modules buffer shims in
  • 将图形对象转换为位图

    我的图形对象确实有以下问题 EDIT 我有一个图片框图像 图像RxTx 这是来自摄像机的实时流 我在绘制事件中所做的就是在图像 imageRxTx 上绘制一些线条 下面的代码中未显示 到目前为止 这没有问题 现在我需要检查 imageRxT
  • 如何找到距离原点最近的坐标?

    我知道有很多关于按多个值对 javascript 数组进行排序的问题 但没有一个答案解决了我的问题 我有一个坐标数组 例如 x y 10 20 12 18 20 30 5 40 100 2 如何获取距离原点最近的坐标 使用以下方法计算每个点
  • 快速多重替换为字符串

    我有一个如下所示的字符串 A jahshs b jwuw c wuqjwhaha d e f jsj g 我需要更换每一个 x 用不同的字符串 问题来了 因为这个过程将重复大约 1000 次 秒 所以我需要一种优化 快速的方法来完成它 任何
  • 如何优化 HTML 表格中的多个重复图像

    我正在生成一个大型 HTML 表格 并且对许多单元格使用图像 例如 一列可能具有拇指向上的图像或拇指朝下的图像 如果我有 300 行 其中 200 行竖起大拇指 那么它们都有 a href link img src http myserve
  • .NET 中小数、浮点和双精度之间的区别?

    有什么区别decimal float and double在 NET 中 什么时候有人会使用其中之一 float C 别名为System Single and double C 别名为System Double are 漂浮的binary点
  • List.add 和手动添加项目到 Riverpod StateNotifier> 之间的区别

    我想学习如何使用Riverpod https riverpod dev 因此为此我正在实现一个小应用程序 该应用程序显示项目列表和一个按钮 该按钮在点击时将虚拟项目添加到列表中 问题背景 按下以下应用程序中的按钮将按预期工作 添加一个虚拟项
  • MKMapView居中并放大

    我在一个项目中使用 MKMapView 希望将地图置于坐标中心并放大 就像 Google 地图一样 GMSCameraPosition camera withLatitude 33 8683 longitude 151 2086 zoom
  • 使用 bootstrap css 打印

    我有一个带有 bootstrap css 布局的页面 我正在尝试打印表格 然而 该表看起来与屏幕上的完全不同 我包含这样的 css 文件 有没有办法让打印的表格看起来与屏幕上的一样 或者我是否必须为我想要打印的表格创建一个特定的 css 文
  • 当 access_type=online 时,“此应用程序希望:具有离线访问权限”

    我有一个带有 OAuth 2 0 身份验证的 Google 应用程序 一切过去都工作正常 但最近我开始收到以下 请求许可 屏幕 奇怪的是 当我经过时 我看到这个屏幕access type online 同样 这种方法直到最近才有效 造成这种
  • 在 Scala 3 中派生不透明类型的类型类实例

    Scala 3 有没有办法使用derives关键字与不透明类型别名结合使用 最好有一种无样板的方法 通过自动依赖基础类型 如果有 的相同类型类的实例来为给定的不透明类型别名提供类型类实例 如果能够表达类似的东西就好了 opaque type
  • 将逗号分隔的字符串解析为某种可以循环访问各个值的对象的最简单方法?

    将逗号分隔的字符串值列表解析为可以循环的某种对象的最简单方法是什么 以便我可以轻松访问各个值 示例字符串 0 10 20 30 100 200 我对 C 有点陌生 所以请原谅我问这样一个简单的问题 谢谢 这有一些问题 但最终最简单的方法是使
  • 子类如何访问父类的属性?

    我有一个关于 Javascript 对象的问题 如何访问父类的属性 function randomObj for example button obj this text this is obj function parentClass t
  • dreamhost 上的 SSH 密钥

    我正在尝试设置与 dreamhost 和我的本地计算机配对的 SSH 密钥 我使用 git bash 作为我的终端 使用 mingw32 我可以通过 ssh 电子邮件受保护 cdn cgi l email protection并要求我提供密