3

on My PC:

mosh --ssh="ssh -R 1024:localhost:22" root@RaspberryPi

on Pi:

ssh -p 1024 root@localhost

But I got this message:

pi@raspberrypi ~ $ ssh -p 1024 root@localhost
socket: Address family not supported by protocol
ssh: connect to host localhost port 1024: Address family not supported by protocol

Is it possible to make a reverse tunnel using MOSH? or where am I wrong?

update:

on Pi:

mosh --ssh="ssh -R 1024:localhost:22" root@PC

on PC:

ssh -p 1024 root@localhost

then I was refused:

bash-3.2$ ssh -p 1024 pi@192.168.1.222
ssh: connect to host 192.168.1.222 port 1024: Connection refused

As the title said , how can I make a reverse tunnel using MOSH? Is it possible?

1 Answers1

6

The --ssh command given to mosh is used only to launch the mosh-server remotely. The SSH connection is immediately closed afterwards, so you cannot set up any tunnels this way. (On top of that, the mosh SSP protocol does not support transferring arbitrary data; a separate tool is planned for that.)

However, the error message on your rπ is not caused by that. The socket() function returns EAFNOSUPPORT when the program tries to use a protocol that the OS does not support. My guess is that ssh is trying to use IPv6 but you have disabled it system-wide.

grawity
  • 501,077