5

Nautilus (sftp) 経由でサーバーに接続する前に。ssh -i mycert.pem今、私は Amazon EC2 に移動しました。パスワードを使用せず、証明書のみを使用して、サーバー (ubuntu 10.10 も) に接続する方法は 1 つだけです。以前と同じように、Nautilus を使用してサーバーに接続するにはどうすればよいですか? 他の方法では、/etc/ssh/ssh_config に変更を加えることで証明書を無効にできると思いますが、どうすればよいかわかりません。

UPD: 最後に、sshfs を使用して解決策を見つけました。詳細については、Amazon ec2 ドライブをローカルにマウントする方法 - ヒューズ + sshfs?

キーワード sshfs + amazon ec2 によるグーグル検索

UPD2:

ssh-add /path/to/my_cert.pem

この後、nautilus を介した sftp への接続も正常に機能します

4

1 に答える 1

7

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)

Host myec2host
HostName 151.47.12.88
User ubuntu
IdentityFile ~/.ssh/mycert.pem
Compression yes

Note

  1. Replace myec2host by the alias that you want to access the ec2 instance by
  2. Replace the IP address by the external (optionally elastic) IP address of your instance
  3. Replace ~/.ssh/mycert.pem by the full path to your private key (usually the keypair) you registered the instance with; I copied the name mycert.pem from your own question, so it is probably that file
  4. Any other options (like Compression) are optional. By default, Ubuntu images on ec2 (especially the ones from Canonical) should be logged onto using user ubuntu; root won't work

Of 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)

于 2011-04-12T22:37:26.420 に答える