LoginSignup
4
4

More than 5 years have passed since last update.

パスワードなしのssh設定方法

Last updated at Posted at 2013-10-10

1.passwprdなしの鍵生成
ssh-keygen -N "" -t rsa

2.id_rsa.pub->authorized_keysにリネーム
mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys

3.id_rsa,authorize_keysを600にする
chmod 600 ${HOME}/.ssh/id_rsa ${HOME}/.ssh/authorized_keys

4.接続先サーバにscpで配置
scp -r -p  [local]:${HOME}/.ssh [remote]:

5.ssh接続で確認
ssh [remote]

☆接続できない場合は・・
-パーミッションが原因かも -> 緩すぎるとNG
※↓を確認
--id_rsa,authorized_keysは600以下
--${HOME}が755以下

★鍵生成についての参考サイト
http://morizyun.github.io/blog/ssh-key-bitbucket-github/

4
4
0

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
4
4