1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sshでpermissin deniedとなったとき

Last updated at Posted at 2018-02-11

鍵を作成

ssh-keygen -t rsa

公開鍵をsshでログイン先に登録

ssh-copy-id -o StrictHostKeyChecking=no $HOST/.ssh/id_rsa.pub [ログイン先]

すると以下のエラー

Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

パスワードでのsshログインを許可する為に、
ログイン先のサーバーで以下を設定

# vi /etc/ssh/sshd_config
...
PasswordAuthentication yes	 ←yesにする
...
remote# systemctl restart sshd

これでssh-copy-id実行時パスワードを入力することにより、.ssh/authorized_keysに公開鍵を設定できる

1
5
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
1
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?