8/15/2023 0 Comments Manage ssh tunnel mac![]() Wouldn’t it be nice if you could simply add a port forwarding rules just like with Putty? Putty-like port-forwarding on the command line ssh -i ~/.ssh/vagrant -N -L 5510:server2:5510 I don’t know in advance which ports I have to forward, and I’m not always keen to establish a new session. As long as the command shown below isn’t CTRL-C’d the SSH tunnel will persist. Throw in the -N flag and you don’t even open your login shell! That’s a very convenient way to enable port forwarding. ![]() You can specify either the -L or -R flag (and -D for some fancy SOCKS options not relevant to this post) when establishing a SSH session to a remote host, specifying how ports should be forwarded. For the most part I used the SSH client shipping with Oracle Linux 8.6. I did not go so far as to research when dynamic port forwarding was introduced but it seems to be present for a little while. The contents of this post was tested with a wide range of SSH clients. A similar feature exists for SSH clients on MacOS and Linux (and even Windows as its ssh client is also based on OpenSSH) Port-forwarding in openSSH clients after the session has already been established. ![]() One of the nice things in Putty is its ability to add port forwarding rules on the fly, e.g. The situation used to be different on Windows.īefore Windows supported a built-in SSH client on the command line Putty was (and still is!) one of the primary tools available to perform remote administration. As a Linux or Mac user you benefit from a very useful, built-in terminal and SSH client implementation that’s mostly identical across all Unix-like systems. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |