PDA

View Full Version : Ssh ?


luca
2004-09-22, 09:58 AM CDT
Dear all

I am awfully sorry for this to be a sequel of a previous thread ( shell ) in general support. nonetheless I desperately need to solve this matter that has been plagueing me for days now.

Why can't you open an ssh session within an already open one ? Better computer B ( client ) in connect.sh opens an ssh connetion with computer A ( server ) asking to run connect.sh, in which computer A open a connection with B

B.connect.sh

ssh root@10.0.0.102 A.path/connect.sh

A.connect.sh

ssh root@10.0.0.106

After autenticating me for B.connect.sh ssh statement, it does not autenticate me again and this is what I get:
What i get is:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).

I have reviewed the sshd_config file, but with no joy at all.
Has anyone any ideas?
thanks in advance
:( :(

jiawj
2004-09-22, 09:35 PM CDT
Did you find ~/.ssh/authorized_keys exist ?
if yes, remove it and reconnect with ssh.
good luck

luca
2004-09-23, 01:55 AM CDT
hi there,
I still get the same message:
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password,keyboard-interactive).
this though instead of being prompted for a passphrase, I have been prompted for the root's password.

what could possibly be?
the strange thing is that if I execute the procedure manually it works without a hitch..

jiawj
2004-09-23, 08:28 AM CDT
I know your idea now, and I misunderstanded your meaning previously.
You want to connect automatic one another, which need to build authorized_keys to avoid to be prompted enter password on interactive mode:

run command : ssh-keygen -t dsa
and then 10.0.0.102 an 10.0.0.106 exchange id_dsa.pub
..........

my english is not good , I hope your comprehend my meaning.
good luck.

luca
2004-09-23, 09:44 AM CDT
dear jiawj,
your english would be good enough even if started talking about politics.

I have already taken that venue, and I was being prompted not for a password but for a passphrase ( the one that I chose for the private key ). The problem is that, as you can see, whether I am prompted for a password or a passphrase, I should be prompted twice: once for the first ssh session and once for the second ssh session. The thing is that I get prompted for password/passphrase only once, and I don't understand why.

What's more, I have generated public keys and exchanged them, but I still get prompted for passphrase.
if you run the whole thing manually, you shall have no problem, instead if you do my way, using shell script, it prompts you for a password/passphrase only once.

what is going on?
take care
luca

Sundance Kid
2004-09-23, 10:46 AM CDT
Hey luca,

I'm not exactly sure what you are trying to do. However I think this might help this is a tutorial on key based authentication might help. I'm sorry if I'm way off base. I user this to query memory information on another server. I hope this helps.

http://www.iross.net/site/articles/sshkeys

luca
2004-09-24, 01:40 AM CDT
hi all,

the idea behind these script is the following: I need to open an ssh session on a server to run a script ( A.connect.sh ) which connects to the client through an ssh session ( the same client that initiated the first ssh session ) in order to upload some file and do some housekeeping.

You might wonder why all this rount-trip thing: well, only for security reasons, In my opinion it should the server that should contact the client (ip hardcoded) for the upload.

thank you guys
your feedback is very helpful
luca :)