“Mosh session finished!” immediately after connection attempt #1582
-
Checklist
Configuration
Describe the bugI try to connect to my host with mosh and it fails silently with “Mosh session finished!” and no other output unless I do the Mosh is installed on the host at the location in the output. I’ve even copied the file at The same output happens when I try to connect via the IP, but it prompts for a password at some point and still fails.
Thanks in advance for your help. Expected behavior: Screenshot: blink> mosh elliotec --verbose MoshClient:DEBUG:"/usr/bin/mosh-server" new -s -c 256 -l LC_ALL=en_US.UTF-8 MoshClient:DEBUG:ssh -v -o compression=no -t elliotec -- "/usr/bin/mosh-server" new -s -c 256 -l LC_ALL=en_US.UTF-8 A socket_callback_connected: Socket connection callback: 1 (0) ssh_key_cmp: key types don't match! ssh_known_hosts_read_entries: Failed to open the known_hosts file '/etc/ssh/ssh_known_hosts': No such file or directory ssh_key_cmp: key types don't match! ssh_packet_userauth_failure: Access denied for 'none'. Authentication that can continue: publickey,password,keyboard-interactive ssh_agent_get_ident_count: Answer type: 12, expected answer: 12 ssh_packet_userauth_failure: Access denied for 'publickey'. Authentication that can continue: publickey,password,keyboard-interactive ssh_packet_global_request: Invalid SSH_MSG_GLOBAL_REQUEST packet channel_request: Channel request env failed channel_request: Channel request env failed |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This appears to be an issue caused by the fact I’m trying to mosh into WSL2. Windows apparently doesn’t support Mosh at all, so I’m not sure this is possible. |
Beta Was this translation helpful? Give feedback.
-
Just my 2cents, as I never tried mosh under WSL. From the output, it looks like you are actually being connected, but the session finishes immediately. This may happen if a command on the remote immediately runs and exits (which seems weird in this case as you did not execute anything), or maybe something on the windows side (may be similar to mobile-shell/mosh#781 ?). |
Beta Was this translation helpful? Give feedback.
-
I have the same problem while trying to connect to an Ubuntu server using Blink 14 from my iPad pro. I haven’t used it for a while, but I think last time I tried it from the same iPad to the same Ubuntu server it was working. |
Beta Was this translation helpful? Give feedback.
-
Could be some bug with Blink: https://www.reddit.com/r/BlinkShell/comments/ufp67s/issue_with_mosh_connections/ |
Beta Was this translation helpful? Give feedback.
-
Oh no, sorry, I found the solution. It was a command in the mosh configuration for this particular server. When there is a command configured mosh executes it and in my case the command exited immediately |
Beta Was this translation helpful? Give feedback.
Just my 2cents, as I never tried mosh under WSL. From the output, it looks like you are actually being connected, but the session finishes immediately. This may happen if a command on the remote immediately runs and exits (which seems weird in this case as you did not execute anything), or maybe something on the windows side (may be similar to mobile-shell/mosh#781 ?).