Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SSHFS mount über einen Rechner hinweg
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum
View previous topic :: View next topic  
Author Message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Wed Dec 06, 2006 4:16 pm    Post subject: SSHFS mount über einen Rechner hinweg Reply with quote

Moin zusammen,

ich möchte über SSH ein Remote Verzeichnis mounten.
Allgemein ist das ja kein Problem: SSHFS

Ich habe allerdings die Situation, dass ich mich erst von meinem Rechner A auf einem Rechner B einloggen _muss_, der Zugriff auf den Rechner C hat.
Falls das zu kompliziert war. Ich mach es mit SSH immer so:
Code:
RechnerA$ ssh rechnerb
RechnerB$ ssh rechnerc
RechnerC$ echo "und schon bin ich da!"


Leider klappt das nicht so einfach mit SSHFS, da ich SSHFS ja auch noch bescheid, sagen muss, dass er, nachdem er sich auf Rechner B eingeloggt hat, auch noch auf Recher C einloggen muss.
Zu Rechner B & C habe ich nur "normale" Zugriffsrechte, kann also auch nicht auf Rechner B mal eben SSHFS installieren.
Ach ja, zum ganzen Überfluß kann ich mich auf B und C auch nicht über einen PublicKey einloggen, sondern muss immer das Passwort eingeben.

Ist irgendwie ne ganz schön harte Nuß, aber irgendwie muss das doch gehen... :?

Tschö mit ö
Manuel
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Thu Dec 07, 2006 6:53 am    Post subject: Reply with quote

Ist Portforwarding möglich? Damit könntest Du den ssh-Port von C nach B durchtunnneln und von dort nach A. Schau Dir dazu mal die Hilfe zu ssh an bei den Parameter -L und -R. Um C zu erreichen brauchst Du dann (auf A) nur localhost unter einem bestimmten Port connecten.

Habe es jetzt nicht genau im Kopf, aber müßte ungefähr so aussehen:

Code:
ssh RechnerB -R 2222:RechnerC:22 -L 2222:localhost:2222


und dann erreichst Du Rechner C (auf A) unter localhost:2222
Back to top
View user's profile Send private message
moe
Veteran
Veteran


Joined: 28 Mar 2003
Posts: 1289
Location: Potsdam / Germany

PostPosted: Thu Dec 07, 2006 10:31 am    Post subject: Reply with quote

Ich mach das immer so:
Code:
rechner_a # ssh -L 2222:rechner_c:22 rechner_b
rechner_a # ssh -p 2222 localhost


Das (sinnlos) geöffnete Terminal zu rechner_b musste dann geeignet verstecken, z.b. mit screen..
Back to top
View user's profile Send private message
Necoro
Veteran
Veteran


Joined: 18 Dec 2005
Posts: 1912
Location: Germany

PostPosted: Thu Dec 07, 2006 11:50 am    Post subject: Reply with quote

moe wrote:
Ich mach das immer so:
Code:
rechner_a # ssh -L 2222:rechner_c:22 rechner_b
rechner_a # ssh -p 2222 localhost


Das (sinnlos) geöffnete Terminal zu rechner_b musste dann geeignet verstecken, z.b. mit screen..


Es gäbe auch die Möglichkeit rechner_a # ssh -L 2222:rechner_c:22 rechner_b -N dann Strg-Z und "bg" ... denn läuft es im Hintergrund :)
man ssh wrote:
-N Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only).

_________________
Inter Deum Et Diabolum Semper Musica Est.
Back to top
View user's profile Send private message
slick
Bodhisattva
Bodhisattva


Joined: 20 Apr 2003
Posts: 3495

PostPosted: Thu Dec 07, 2006 2:03 pm    Post subject: Reply with quote

oder halt autossh
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu Dec 07, 2006 2:35 pm    Post subject: Reply with quote

Nee, Portforwarding ist nicht erlaubt:
Quote:
channel 2: open failed: administratively prohibited: open failed


dann funktioniert autossh auch nicht, oder? (Hab den Sinn von autossh noch nicht so ganz verstanden :oops:
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
b3cks
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1481
Location: Bremen (GER)

PostPosted: Thu Dec 07, 2006 3:24 pm    Post subject: Reply with quote

manuels wrote:
dann funktioniert autossh auch nicht, oder? (Hab den Sinn von autossh noch nicht so ganz verstanden :oops:

net-misc/autossh wrote:
Automatically restart SSH sessions and tunnel

Sagt alles, oder? :wink:
_________________
I am /root and if you see me laughing you better have a backup.
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Thu Dec 07, 2006 8:09 pm    Post subject: Reply with quote

hmm, also klappt autossh dann wohl auch nicht. :cry:
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Thu Dec 07, 2006 10:04 pm    Post subject: Reply with quote

steht auf B+C so etwas wie netcat oder cryptcat zur Verfügung?
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Fri Dec 08, 2006 12:56 pm    Post subject: Reply with quote

nee, leider auch nicht. :evil:
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


Joined: 25 Jun 2003
Posts: 6659
Location: above the cloud

PostPosted: Fri Dec 08, 2006 9:19 pm    Post subject: Reply with quote

schwieriger Fall ;)

Wie wäre es mit einem Workaround bestehend aus pexpect und einem Inputfile in dem die Paßworte für B+C entsprechend automatisiert 'eingetippt' werden? k.A. ob sshfs da mitspielt
_________________
Nothing is secure / Security is always a trade-off with usability / Do not assume anything / Trust no-one, nothing / Paranoia is your friend / Think for yourself
Back to top
View user's profile Send private message
manuels
Advocate
Advocate


Joined: 22 Nov 2003
Posts: 2146
Location: Europe

PostPosted: Sat Dec 09, 2006 1:02 pm    Post subject: Reply with quote

war ja klar: auf dem Server ist kein python installiert. :roll:

Aber Perl ist drauf: Expect-Modul :D
werd ich in den nächsten Tagen mal ausprobieren.
_________________
Build your own live cd with catalyst 2.0!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) Diskussionsforum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum