ssh¶
ssh is installed by default
basic ssh usage¶
the most *nix-style way of getting help for ssh
is man ssh
.
I assume that the ssh
port is 22
and the involved firewalls are setup accordingly.
ssh user@example.com
ssh usage through another machine¶
What if you can't reach a machine directly but through a machine in between?
Of course you could ssh
twice, more compact form is:
ssh -t user@reachable ssh user@unreachable
X-session access¶
ssh -X user@example.com
starting a X-program inside the remote shell will bring up a local X-window.
baobab
Port forwarding to local machine¶
the following command will forward port 3390 (e.g. vrpd
) on example.com
to local 3501.
This is useful when a given port is only accessible local on a remote machine but not accessible from outside.
ssh -L 3501:localhost:3390 user@example.com
now you can connect to the e.g. remote
vrdp
-session by simply on your local machine.rdesktop-vrdp -kde localhost:3501
"dynamic tunnel port" for use as socks.proxy¶
sometimes a VPN is kind of an overkill, so if you only need to access local http-ressources from outside and can establish an SSH-connection from outside, this is a nice solution.
ssh -N -D2000 user@example.com
The parameter -N prevents an interactive shell, the parameter -D defines the local port for the dynamic tunnel. This port should be chosen above 1023, so you don't need root-access.
Von Jeremias Keihsler vor 3 Monaten aktualisiert · 1 Revisionen