Projekt

Allgemein

Profil

Howto ssh » Historie » Version 1

Jeremias Keihsler, 13.01.2017 09:53

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
h2. X-session access
22
23
<pre><code class="bash">
24
ssh -X user@example.com
25
</code></pre>
26
starting a X-program inside the remote shell will bring up a local X-window.
27
<pre><code class="bash">
28
baobab
29
</code></pre>
30
h2. Port forwarding to local machine
31
32
the following command will forward port 3390 (e.g. @vrpd@) on @example.com@ to local 3501.
33
34
This is useful when a given port is only accessible local on a remote machine but not accessible from outside.
35
<pre><code class="bash">
36
ssh -L 3501:localhost:3390 user@example.com
37
</code></pre>
38
now you can connect to the e.g. remote @vrdp@-session by simply on your local machine.
39
<pre><code class="bash">
40
rdesktop-vrdp -kde localhost:3501
41
</code></pre>