LoginSignup
51
52

More than 5 years have passed since last update.

ssh の公開鍵の設定めんどい

Last updated at Posted at 2012-03-16

ssh ログインをパスフレーズ使ってログインするために、公開鍵を渡すときの話

×

$ cat "~/.ssh/id_rsa.pub" | ssh user@hostname "cat >> .ssh/authorized_keys"
  • 長い
  • .ssh ディレクトリないときもっと面倒 (要 mkdir .ssh)
  • authorized_keys が新規作成された時も面倒 (要 umask 077)

$ ssh-copy-id user@hostname
  • 短い
  • このためだけに覚えるの面倒
  • ポート番号を 22 から変更していると無理っぽい? → 下の yaotti 氏のコメント参照
51
52
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
51
52