Pure-Rust asynchronous SSH library, both client and server

#8 local pijul clone via ssh fails

Opened by robx on November 15, 2020
robx on November 15, 2020

In order to debug my nest ssh issues, I tried cloning locally via ssh, and see some issues (that seem different from those with nest):

$ pijul clone rob@localhost:/s/pijul pijul-ssh-clone
[2020-11-15T13:02:45Z ERROR pijul::remote::ssh] Key changed for "localhost:22"
Password for rob@localhost: 
Error: Channel send error

I’m not sure if the two errors are related. Enabling debug output (for the client), I see:

...
[2020-11-15T12:51:51Z DEBUG thrussh_keys] line = "localhost ecdsa-sha2-nistp256 AAAA...I=\n"
[2020-11-15T12:51:51Z DEBUG thrussh_keys] "localhost" "AAAA...I=\n"
[2020-11-15T12:51:51Z ERROR pijul::remote::ssh] Key changed for "localhost:22"
[2020-11-15T12:51:51Z DEBUG thrussh::client] drop session
Password for rob@localhost: 
[2020-11-15T12:52:03Z DEBUG thrussh::client] drop handle
Error: Channel send error

Is there a way to enable debug logging for the remote pijul process? (My understanding is that pijul probably does something like running pijul remotely in some kind of server mode via ssh.)

robx on November 15, 2020

If I wipe my ~/.ssh/known_hosts file, pijul offers to learn the key, and writes


localhost ssh-ed25519 AAAA...D+

That’s a different key than was listed with localhost before. Note also the extra blank lines.

With this key configured, the same clone command now fails differently:

$ pijul clone rob@localhost:/s/pijul pijul-ssh-clone
Password for rob@localhost: 
Error: Not authenticated

Debug output near the errors:

Password for rob@localhost: 
[2020-11-15T13:18:04Z DEBUG thrussh::client::encrypted] write_auth_request_if_needed: is_waiting = true
[2020-11-15T13:18:04Z DEBUG thrussh::session] flushing len 55
[2020-11-15T13:18:04Z DEBUG thrussh::cipher] padding length 8
[2020-11-15T13:18:04Z DEBUG thrussh::cipher] packet_length 64
[2020-11-15T13:18:04Z DEBUG thrussh::client] writing 84 bytes
[2020-11-15T13:18:04Z DEBUG thrussh::client] disconnected
[2020-11-15T13:18:04Z DEBUG thrussh::client] drop session
[2020-11-15T13:18:04Z DEBUG thrussh::client] drop handle
Error: Not authenticated
jorsn on February 27, 2021