Mosh: can't connect to remote interactive session with 'ssh -t'

Created on 29 Aug 2014  路  2Comments  路  Source: mobile-shell/mosh

I am trying to connect to my remote tmux session, where I have running IRC client, using mosh. With plain ssh, it looks like this:

$ ssh -t target "tmux attach"
# poke around and when done, detach from session
[detached]
Connection to target closed.

mosh:

$ mosh --ssh="ssh -t" target "tmux attach"
Pseudo-terminal will not be allocated because stdin is not a terminal.
ioctl TIOCGWINSZ: Invalid argument
If running with ssh, please use ssh -t to provide a PTY.
/usr/bin/mosh: Did not find mosh server startup message.

Is this a bug or am I doing something wrong?

Most helpful comment

The syntax with mosh is simpler:

mosh HOSTNAME -- tmux attach

Mosh always uses a pty because it is a remote terminal.

(Please see the "With a command" section of http://mosh.mit.edu for a similar example.)

All 2 comments

The syntax with mosh is simpler:

mosh HOSTNAME -- tmux attach

Mosh always uses a pty because it is a remote terminal.

(Please see the "With a command" section of http://mosh.mit.edu for a similar example.)

Thank you! Works like a charm.

Was this page helpful?
0 / 5 - 0 ratings