I keep forgetting how to debug ssh
connection problems from one local machine to another (in my case, my laptop).
This short guide lists the steps to successfully connect but it assumes that the pre-requisite requirements are
already satisfied.
Specifically, both machines need to be on a local network managed by ZeroTier One
. Note
that after a restart, the zerotier
application needs to be started again on a Windows machine. (I need to double
check whether zerotier
starts automatically on my Linux machine but I didn't have to start it again just now.)
The ssh
keys need to be set up on both machines accordingly.
Both of my machines have tmux
installed and the "remote" local machine (the one I am connecting to i.e. my laptop)
has a host nickname (remote-host
below) set up in .ssh/config
on my "local" local machine.
Steps:
- Check if the
zerotier
application is running. If not, start it. - Check if the
sshd
server is running (on the WSL) with:
service ssh status
If it isn't, restart with:
sudo service ssh restart
- Connect with the following provided
sshtmux
is defined in.bashrc
:
sshtmux remote-host sess-name