Вем привет. Имею странную проблему и не очень понимаю куда копать.
Часть 1 - рабочаяssh root@jenkins_server
jenkins# su - jenkins
jenkins# ssh root@serverA
serverA#
Часть 2 - рабочаяssh root@jenkins_server
jenkins# su - jenkins
jenkins# ssh root@serverB
serverB#
Часть 3 - не рабочаяssh root@jenkins_server
jenkins# su - jenkins
jenkins# ssh serverA
serverA# ssh root@serverB
need password:
при этом получаю такой лог на serverA:
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /root/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /root/.ssh/id_dsa
debug3: no such identity: /root/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ecdsa
debug3: no such identity: /root/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /root/.ssh/id_ed25519
debug3: no such identity: /root/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug3: authmethod_lookup password
debug3: remaining preferred: ,password
debug3: authmethod_is_enabled password
debug1: Next authentication method: password
root@serverB's password:
serverA# ls -lah /root/.ssh/
drwx------ 2 root root 4.0K Aug 15 14:58 .
drwx------ 9 root root 4.0K Aug 17 06:25 ..
-rw------- 1 root root 7.8K Aug 15 14:58 authorized_keys
-rw-r--r-- 1 root root 139 Jul 3 17:55 config
-rw------- 1 root root 392 Jul 3 17:55 id_rsa
-rw-r--r-- 1 root root 1.1K Aug 17 14:03 known_hosts
Вариант рабочийssh root@serverA
serverA# ssh root@serverB
Я пробовал ssh в разных вариантах с ключом -a запускать, эффекта не взымело. Соответсвенно ключи везде раскинуты.
PS я не стал запариваться с приглашением строки (#/$), строго не бейте.