The first step is to establish the port number used by EM Express. Let’s assume I’d like to use port-forwarding to tunnel the Oracle Enterprise Manager (EM) Express port for one of my Pluggable Databases (PDBs) to my local laptop. Basic help is available, using the -h option. !command allows the user to execute a local command if the PermitLocalCommand option is enabled in ssh_config(5). It also allows the cancellation of existing port-forwardings with -KLport for local, -KRport for remote and -KDport for dynamic port-forwardings. Currently this allows the addition of port forwardings using the -L, -R and -D options (see above). The most interesting escape key is ~C: it opens a command line. The ssh(1) man page lists the available options in a section titled “ESCAPE CHARACTERS” (yes, the man page lists it in uppercase, it wasn’t me shouting). Once established you can control the behaviour of your SSH session using escape characters. 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 |