I would like to ssh into my machine at home that has 22 open on my router and then be able to open another terminal and ssh to any other machine on my local network at home through my already open ssh connection.
I created an ssh script that had something to this affect:
-L 6000:IP ADDRESS OF MACHINE ON HOME NETWORK:22
If that is supposed to work then maybe I am not typing my ssh command properly. If that is so can anyone tell me how to ssh to a specific port?
From the command line, you can type in
ssh -L 6000:IP ADDRESS OF MACHINE ON HOME NETWORK:22 username@home_external_ip
Then, from another terminal, you can do
ssh -p 6000 username@localhost
and your connection will automatically be forwarded to port 22 on IP ADDRESS OF MACHINE ON HOME NETWORK.
If you see an error about a host key having changed, let me know and we'll work through that.