This works fine with the latest libssh 0.8.4, when building the Debian unstable package for 18.10, it works fine:
$ G_MESSAGES_DEBUG=cockpit-ssh cockpit-bridge --interact=---
{ "command": "open", "channel": "c", "payload": "echo", "host": "x0.cockpit.lan", "user": "<email address hidden>" } ---
{"command":"authorize","challenge":"*","cookie":"session109311540371777"} ---
{"command":"authorize", "response": "password foobarfoo", "cookie":"session109311540371777"} --- (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:06.880: cockpit-ssh x0.cockpit.lan: host not known in any local file, asking sssd (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.165: cockpit-ssh x0.cockpit.lan: using known hosts file /tmp/known-hosts.KIBHRZ (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.248: cockpit-ssh x0.cockpit.lan: connected (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.249: cockpit-ssh x0.cockpit.lan: verified host key (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.278: cockpit-ssh x0.cockpit.lan: agent auth failed (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.282: cockpit-ssh x0.cockpit.lan: Got prompt Password: prompt (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.995: cockpit-ssh x0.cockpit.lan: Couldn't set COCKPIT_REMOTE_PEER: Channel request env failed (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:07.995: cockpit-ssh x0.cockpit.lan: opened channel (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:08.071: cockpit-ssh x0.cockpit.lan: queued 162 bytes (cockpit-ssh:10931): cockpit-ssh-DEBUG: 05:03:08.071: cockpit-ssh x0.cockpit.lan: wrote 162 bytes
{"command":"ready","channel":"c"} ---
I bisected this to this upstream fix: https://git.libssh.org/projects/libssh.git/commit/?id=45058285fca549876449afef2c32833b24817e77 . I prepare an SRU.
There are also a few other known_hosts fixes which should get included:
https://git.libssh.org/projects/libssh.git/commit/?id=35a64554899f142a2b8b68c79007ad9c3ce00cb1 https://git.libssh.org/projects/libssh.git/commit/?id=c1a8c41c5daf79e37aa5fde67dd94c8596e81102 https://git.libssh.org/projects/libssh.git/commit/?id=893b69d82b4435973ec4d15aaecdf352f5f827e2
This works fine with the latest libssh 0.8.4, when building the Debian unstable package for 18.10, it works fine:
$ G_MESSAGES_ DEBUG=cockpit- ssh cockpit-bridge --interact=---
{ "command": "open", "channel": "c", "payload": "echo", "host": "x0.cockpit.lan", "user": "<email address hidden>" }
---
{"command" :"authorize" ,"challenge" :"*","cookie" :"session109311 540371777" }
---
{"command" :"authorize" , "response": "password foobarfoo", "cookie" :"session109311 540371777" } ssh:10931) : cockpit-ssh-DEBUG: 05:03:06.880: cockpit-ssh x0.cockpit.lan: host not known in any local file, asking sssd ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.165: cockpit-ssh x0.cockpit.lan: using known hosts file /tmp/known- hosts.KIBHRZ ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.248: cockpit-ssh x0.cockpit.lan: connected ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.249: cockpit-ssh x0.cockpit.lan: verified host key ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.278: cockpit-ssh x0.cockpit.lan: agent auth failed ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.282: cockpit-ssh x0.cockpit.lan: Got prompt Password: prompt ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.995: cockpit-ssh x0.cockpit.lan: Couldn't set COCKPIT_ REMOTE_ PEER: Channel request env failed ssh:10931) : cockpit-ssh-DEBUG: 05:03:07.995: cockpit-ssh x0.cockpit.lan: opened channel ssh:10931) : cockpit-ssh-DEBUG: 05:03:08.071: cockpit-ssh x0.cockpit.lan: queued 162 bytes ssh:10931) : cockpit-ssh-DEBUG: 05:03:08.071: cockpit-ssh x0.cockpit.lan: wrote 162 bytes
---
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
(cockpit-
{"command" :"ready" ,"channel" :"c"}
---
I bisected this to this upstream fix: https:/ /git.libssh. org/projects/ libssh. git/commit/ ?id=45058285fca 549876449afef2c 32833b24817e77 . I prepare an SRU.
There are also a few other known_hosts fixes which should get included:
https:/ /git.libssh. org/projects/ libssh. git/commit/ ?id=35a64554899 f142a2b8b68c790 07ad9c3ce00cb1 /git.libssh. org/projects/ libssh. git/commit/ ?id=c1a8c41c5da f79e37aa5fde67d d94c8596e81102 /git.libssh. org/projects/ libssh. git/commit/ ?id=893b69d82b4 435973ec4d15aae cdf352f5f827e2
https:/
https:/