PSSHの鍵認証エラー
解決したいこと
Ubuntuから複数のVyOSに対して、同時にconfigureでの設定を流し込みたいです。
そこで、PSSHでUbuntuから1台のVyOSへログインを行ったところ、エラーが発生しました。
原因をご存知の方がいらっしゃいましたら、教えていただけますと幸いです。
発生している問題・エラー
client@XXXXX:~/$ parallel-ssh -H 192.168.0.5 -i hostname
[1] 18:48:42 [FAILURE] 192.168.0.5 Exited with error code 255
Stderr: Welcome to VyOS
pssh error: SSH requested a password. Please create SSH keys or use the -A option to provide a password.
client@192.168.10.5: Permission denied(Publickey,password)
使用機器
クライアント:Ubuntu20.04, ホスト名→client
ホスト: VyOS1.3(Vagrant環境 kun432/vyos),ホスト名→Testvyos1
自分で試したこと
前提条件となる鍵認証を以下の手順で実施
Step1. Ubuntuでssh-keygenで鍵ペアを作成
Step2. UbuntuからVyOSに公開鍵 id_rsa.pubを送信
Step3. VyOSで公開鍵を移動
Step4. その後、Ubuntuから鍵認証のログインをパスワードなしでできることを確認
(Step1)
client@XXXXX:~/$ ssh-keygen
※パスワード入力無しで鍵を生成
(Step2)
client@XXXXX:~/$ scp /home/controller/.ssh/.id_rsa.pub Testvyos1@192.168.0.5:/home/Testvyos1/.ssh
Testvyos1:testVR1:~$ mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
(Step3)
Testvyos1:testVR1:~$ mv ~/.ssh/id_rsa.pub ~/.ssh/authorized_keys
(Step4)
client@XXXXX:~/$ ssh Testvyos1@192.168.10.5
Welcome to VyOS
Linux testVR1 4.19.148-amd64-vyos #1 SMP Fri Oct 9 17:19:29:UTC 2020 x86_64
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are describe in the individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Testvyos1@testVR2:~$
上記のステップを行い、psshを行ったところ、冒頭のエラーが再度発生。
また、パスワード有りのログインを行ったところ、同様に失敗しました。
client@XXXXX:~/$ parallel-ssh -A -H 192.168.0.5 -i hostname
Warning: do not enter your password if anyone else has superuser
privileges or access to your account.
Password: (Testvyos1のパスワードを入力)
[1] 18:48:42 [FAILURE] 192.168.0.5 Exited with error code 255
Stderr: Welcome to VyOS
client@192.168.10.5: Permission denied(Publickey,password)
参考サイト
・ https://www.server-world.info/query?os=Ubuntu_20.04&p=ssh&f=10
・ https://www.server-world.info/query?os=Ubuntu_20.04&p=ssh&f=4
0 likes