Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ssh login dauert zu lange
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)
View previous topic :: View next topic  
Author Message
AntonWert
Apprentice
Apprentice


Joined: 06 Mar 2005
Posts: 177

PostPosted: Sun Sep 18, 2005 3:54 pm    Post subject: ssh login dauert zu lange Reply with quote

Ich hab einen Apache Webserver mit PHP und SQL am laufen. Nun darf ein Benutzer (mit PW) per dynamischer Webseite einen Befehl auf einem Zweitrechner ausführen.
Bisher verwende ich hierfür den system-Befehl der per SSH mit key-File sich ohne Passwort auf dem 2. Rechner einloggt und dort ein entsprechendes Skript ausführt. Leider dauert der ssh-Login ca. 20-30 sec was mir zu lange dauert...
Kann ich das irgendwie beschleunigen?
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


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

PostPosted: Sun Sep 18, 2005 4:46 pm    Post subject: Reply with quote

kleiner Schuß ins Blaue

funktioniert eine reverse-DNS Auflösung vom Webserver auf den zweiten Rechner? Also IP->DNS-Name?
_________________
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
schmutzfinger
Veteran
Veteran


Joined: 26 Oct 2003
Posts: 1287
Location: Dresden/Germany

PostPosted: Sun Sep 18, 2005 5:52 pm    Post subject: Reply with quote

Keine Lösung zu deinem Problem aber für dein Vorgehen vielleicht trotzdem von Interesse. Man kann an einen ssh Schlüssel einen bestimmten Befehl binden. D.h. der Nutzer kann mit einem bestimmten key einen bestimmten Befehl z.B als root@server ausführen. Er kann aber keine shell bekommen und braucht auch kein Passwort.

/root/.ssh/authorized_keys
Code:

command="/bin/date",from="192.168.0.1" ssh-rsa ...


Damit kannst du deinen Nutzer wirklich auf das eine Script beschränken, vielleicht sogar auf einen Quellhost.

mehr dazu sagt man sshd.
Back to top
View user's profile Send private message
AntonWert
Apprentice
Apprentice


Joined: 06 Mar 2005
Posts: 177

PostPosted: Sun Sep 18, 2005 9:49 pm    Post subject: Reply with quote

Think4UrS11 wrote:
kleiner Schuß ins Blaue

funktioniert eine reverse-DNS Auflösung vom Webserver auf den zweiten Rechner? Also IP->DNS-Name?


Könnte ein Treffer ins schwarze sein !
Kann ich eigentlich was machen, wenn ich diese Auflösung nicht garantieren kann?
Back to top
View user's profile Send private message
think4urs11
Bodhisattva
Bodhisattva


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

PostPosted: Sun Sep 18, 2005 10:37 pm    Post subject: Reply with quote

AntonWert wrote:
Kann ich eigentlich was machen, wenn ich diese Auflösung nicht garantieren kann?

Klar.

Trag - am besten auf beiden - Maschinen die jeweils andere in /etc/hosts ein.
Normalerweise wird diese erst gecheckt und nur wenn dort nichts gefunden wird, wird der DNS-Server gefragt. (Kann man auch umstellen)
_________________
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
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) 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