Howto ssh » Historie » Version 1
Jeremias Keihsler, 13.01.2017 11:04
1 | 1 | Jeremias Keihsler | h1. ssh |
---|---|---|---|
2 | |||
3 | *ssh* is installed by default |
||
4 | |||
5 | h2. basic ssh usage |
||
6 | |||
7 | the most *nix-style way of getting help for @ssh@ is @man ssh@. |
||
8 | I assume that the @ssh@ port is @22@ and the involved firewalls are setup accordingly. |
||
9 | <pre><code class="bash"> |
||
10 | ssh user@example.com |
||
11 | </code></pre> |
||
12 | |||
13 | h2. ssh usage through another machine |
||
14 | |||
15 | What if you can't reach a machine directly but through a machine in between? |
||
16 | |||
17 | Of course you could @ssh@ twice, more compact form is: |
||
18 | <pre><code class="bash"> |
||
19 | ssh -t user@reachable ssh user@unreachable |
||
20 | </code></pre> |
||
21 | |||
22 | h2. X-session access |
||
23 | |||
24 | <pre><code class="bash"> |
||
25 | ssh -X user@example.com |
||
26 | </code></pre> |
||
27 | starting a X-program inside the remote shell will bring up a local X-window. |
||
28 | <pre><code class="bash"> |
||
29 | baobab |
||
30 | </code></pre> |
||
31 | |||
32 | h2. Port forwarding to local machine |
||
33 | |||
34 | the following command will forward port 3390 (e.g. @vrpd@) on @example.com@ to local 3501. |
||
35 | |||
36 | This is useful when a given port is only accessible local on a remote machine but not accessible from outside. |
||
37 | <pre><code class="bash"> |
||
38 | ssh -L 3501:localhost:3390 user@example.com |
||
39 | </code></pre> |
||
40 | now you can connect to the e.g. remote @vrdp@-session by simply on your local machine. |
||
41 | <pre><code class="bash"> |
||
42 | rdesktop-vrdp -kde localhost:3501 |
||
43 | </code></pre> |