![]() ![]() It allows you to forward traffic from a local port to a remote server, where it is then forwarded to another destination. So you'll end up with something like: ssh -N -R 8090:localhost:22 -o ServerAliveInterval=30Īlso, if one of the network hops between you and the server is down at any point, the connection will drop despite any KeepAlive options you specify, so you might want to add this command to inittab, or look into the daemontools package or your distro's equivalent, so that it always starts on boot and is restarted when it exits for some reason other then system shutdown (or you could run it from a shell script that loops infinitely, but init or daemontools are cleaner solutions). Local Port Forwarding Local port forwarding is the most common type of SSH tunneling. If you are leaving the connection running so you can get in later from a remote site, then you are going to want to make sure the connection doesn't time-out due to inactivity by adding the relevant options ( -o TCPKeepAlive=yes or -o ServerAliveInterval=30) Replacing -L 22:localhost:8090 with -R 8090:localhost:22 will tell the remote host to listen on port 8090 and forward requests to your SSH server. Getting started Managing extensions Forwarding a port / creating SSH tunnel Opening a terminal on a remote host Debugging on the SSH host SSH host-specific. For the most basic use case, SSH is used to initiate a terminal session with a remote SSH server. Network traffic from the local machine is routed from an arbitrary specified port on the localhost through the SSH connection to a specified port on the remote machine. I think what you are looking for is remote forwarding. An SSH tunnel is a secure connection between an SSH client and an SSH server. You can't do that, because your local port 22 is already taken by your local SSH server. You are asking it to listen on your local port 22 and forward connections to a remote system's port 8090. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |