[linux-l] Rechner hinter Router administrieren

Thomas Schmidt belug at thomasschmidt.com
Mi Sep 19 09:49:56 CEST 2007


Hallo!

Danke für die Antworten. Es gab ja zwei brauchbare Hinweise, die sich nur in 
einem Parameter unterscheiden: Olaf meint -R, Ivan meint -L.
Unterschiede:
-L [bind_address:]port:host:hostport
             Specifies that the given port on the local (client) host is to be
             forwarded to the given host and port on the remote side.

-R [bind_address:]port:host:hostport
             Specifies that the given port on the remote (server) host is to
             be forwarded to the given host and port on the local side.

Danach ist Olafs Version mit -R richtig:
> lass den user ssh -R 40022:localhost:22 <deinekiste> ausführen. dann
> kannst du mit ssh -p 40022 localhost auf seine kiste.

Ich habe jetzt folgendes gemacht:
$ cat .ssh/config
RemoteForward 20013 localhost:22

Wenn ich mich ganz einfach mit "ssh server" auf meinem Server einlogge, kann 
ich auf dem Server "ssh localhost -p 20013" tippen und bin wieder zu Hause. 
Also alles bestens.

Ein Schönheitsfehler ist noch da: Die Fingerprints in ~/.ssh/known_hosts 
werden pro Host und nicht pro Port gespeichert, deshalb muss ich wohl die 
Zeile vorher immer löschen. Etwas blöd, aber machbar.

Vielen Dank nochmal für die prompte Hilfe an Olaf!

Thomas



Mehr Informationen über die Mailingliste linux-l