mobile-shell / mobile-shell/mosh

mosh sometimes fails to connect on ssh connections with mismatched ssh keys, ssh prompts are missing

Open
#754 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
14.5k
Forks
865
PR merge metrics
No merged PRs in 30d

Description

@boulet- reported an issue (via IRC) where he had trouble connecting with mosh:

2016-05-15 15:53:58 Boulet Hi, I got some troubles with mosh : mosh user@ip -- tmux works fine but I can't do mosh user@ip -- tmux attach -> [mosh is exiting.] ..
2016-05-15 15:54:06 Boulet How to run a mosh client in debug ?
2016-05-15 15:54:49 achin i wonder if there is an error message from tmux, but mosh is eating it
2016-05-15 15:55:29 Boulet achin: if i run a classic mosh connection then tmux attach it works fine
2016-05-15 15:56:09 achin what if you do ssh -t user@ip -- tmux attach ?
2016-05-15 15:56:12 cgull It's a little awkward. Two things can help. 1: run mosh inside script, and look at the log after your session fails. 2: the --no-init flag will stop Mosh from clearing/switching screens on exit.
2016-05-15 15:56:46 cgull achin's suggestion is probably the first thing to try
2016-05-15 15:57:58 Boulet Go it, Warning: the RSA host key for '' differs from the key for the IP address '' ...
2016-05-15 15:58:01 Boulet thx achin !
2016-05-15 15:59:32 Boulet I didn't get why my mosh command without tmux attach works with the warning about host key ... strange thing
2016-05-15 16:00:01 achin i don't either
2016-05-15 16:02:18 cgull Is the message coming from the local ssh client, or from an ssh running in your remote tmux?
2016-05-15 16:04:02 Boulet cgull: from the local one
2016-05-15 18:08:35 cgull Boulet: I'm using another machine that has mismatched saved keys, and now I'm seeing a problem with mosh. But not always-- it seems to be intermittent. If I do "mosh remotehost" (no command) sometimes it works and sometimes I get no connection. Was it like this for you?
2016-05-15 18:09:26 cgull And do you have to type a password for this connection?
2016-05-15 18:12:07 cgull And what OS are you using on your client?
2016-05-15 18:14:26 Boulet cgull: i didn't get any trouble without command (I may retry testing), no password (publickey), client on OSX / server on archlinux
2016-05-15 18:15:17 Boulet Available for some tests but right now i'm going to sleep :)
2016-05-15 18:15:32 cgull It's kind of strange, especially since ssh shouldn't be working at all. That's OK, I'm just writing up a Github issue for now

I'm on an OS X client, FreeBSD server, and I'm running mosh remotehost; sometimes this works, sometimes it doesn't.

It'd also be good to better handle SSH's messages/prompts for security issues.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reproducing mosh remotehost on an OS X client with mismatched SSH keys, then trace the connection's SSH message and prompt handling; done means the connection behavior is reliable and relevant SSH warnings or prompts are visible.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, networking, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.