PermitTunnel yes
PermitRootLogin = yes
sudo service ssh restart
Add a network interface on server side
sudo ssh -f -o Tunnel=ethernet -w 0:0 root@ServerIP ifconfig tap0 10.5.5.1 netmask 255.255.255.0
Add a network interface on client side (it sometimes doesn't work, but it works anyway)
sudo ifconfig tap0 10.5.5.2 netmask 255.255.255.0 up
Access server seeting up the port
sudo ssh -f -N -T -R 22222:localhost:22 ServerIP
Sometimes it's necessary to configure the /etc/ssh/sshd_config
in the client-side, to allow Tunel and root login.
Access the client using the port you've set up before
ssh -p 22222 root@localhost
If you're going to be accessing this host on a regular basis, you can also simplify access by adding a few lines to your ~/.ssh/config
file:
host anyhost
User root
Hostname localhost
Port 22222
Then you can access the client like this:
ssh root@anyhost