在 Ubuntu 10.10 中通过 Nautilus 使用证书进行 Ssh(sftp)
在我通过 Nautilus (sftp) 连接到我的服务器之前。 现在我转移到 Amazon EC2,只有一种方法可以连接到服务器(ubuntu 10.10 也是如此),使用 ssh -i mycert.pem,无需密码,只需证书。 我如何使用 Nautilus 连接到服务器,就像我之前所做的那样? 换句话说,我想我可以通过在 /etc/ssh/ssh_config 中进行一些更改来禁用证书,但不知道该怎么做。
更新: 最后我通过使用 sshfs 找到了解决方案,这里有更多解释 如何在本地安装 Amazon ec2 驱动器 - fusion + sshfs?
并通过关键字 sshfs + amazon ec2
UPD2 进行谷歌搜索:
ssh-add /path/to/my_cert.pem
在通过 nautilus 连接到 sftp 后也工作正常
Before I connected to my server via Nautilus (sftp).
Now I moved to Amazon EC2, and there's just one way connect to server (ubuntu 10.10 too), using ssh -i mycert.pem
, no password, just certificate.
How can I connect to the server using Nautilus, just like i did before?
In other way I guess I can disable certificate by making some changes in /etc/ssh/ssh_config,but not sure what to do.
UPD:
Finally i found solution by using sshfs, more explanation here How to mount Amazon ec2 drive locally - fuse + sshfs?
and googling by keywords sshfs + amazon ec2
UPD2:
ssh-add /path/to/my_cert.pem
and after this connection to sftp via nautilus also working fine
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您刚刚说“并且只有一种方式连接 [...] 只是证书”时,我不太明白您所说的“我想我可以禁用证书”是什么意思 >?
我猜你希望在 .ssh/config 中有更多类似的东西。将类似于以下 5 行的部分附加到任何现有的 ~/.ssh/config(即 /home/sehe/.ssh/config)
注意
myec2host
替换为别名您希望通过~/.ssh/mycert.pem
替换为您的私钥的完整路径(通常密钥对)您注册实例所使用的; 我从您自己的问题中复制了名称mycert.pem
,因此可能是该文件ubuntu
;root
不起作用当然
man ssh_config
会在细节上创造奇迹。另外,http://alestic.com/ 是关于 Ubuntu+EC2 的优秀资源(只要确保不要混淆 Alestic 和 Canonical图像)。最后还有ec2ubuntu 的 Google 群组,它对初学者非常有帮助。这样,您只需将 Nautilus 指向服务器“my3c2host”即可免费重置。如果密钥受密码保护,您可以使用密码代理(seahorse、gpg-agent...不知道)
I don't quite know what you mean by "I guess I can disable certificate" when you just said "and there's just one way connect [...] just certificate"?
I guess you'd like to have something more like this in .ssh/config. Append a section like the following 5 lines to any existing ~/.ssh/config (i.e. /home/sehe/.ssh/config)
Note
myec2host
by the alias that you want to access the ec2 instance by~/.ssh/mycert.pem
by the full path to your private key (usually the keypair) you registered the instance with; I copied the namemycert.pem
from your own question, so it is probably that fileubuntu
;root
won't workOf course
man ssh_config
will do miracles for the details. Also, http://alestic.com/ is an excellent resource on Ubuntu+EC2 (just make sure you don't confuse the Alestic and Canonical images). Lastly there is the google group for ec2ubuntu which has been very helpful to starters.This way you can just point Nautilus at the server 'my3c2host' and get the reset for free. If the key is protected with a passphrase, you can use a passphrase agent (seahorse, gpg-agent... dunno by heart)