I'm assuming that you have the same code posted earlier:-
Your command starting if ssh -l $users ...... will expand to include ALL the values of $users so you would end up with a command line like:-
....which is an awful mess. This will try to login to server sirius with user account root (no key provided) and run the command postgres -i /home/sirius/.ssh/id_rsa /var/lib/postgresql/.ssh/id_rsa /var/lib/postgresql/.ssh/id_rsa.pub 192.168.2.37 -o BatchMode=yes -o ConnectTimeout=5
Do you actually want to loop round and try all the combinations perhaps? If so, try something like:-
Does that get you any nearer? note that I put the target host at the end so that all the options will be used. There will very likely be lots of failures as you try all the combinations.
As another note, there is no point trying to login with a public key.
Great, I believe this should do the trick very well, I will test it tomorrow morning. I have 2 questions;
1) Why some ':' at the beginning?
2) Doesn't the 'one_user' 'one_host' 'one_sshkey' variables needs to be defined before using them? like one_user = $(...)
Hi - If iam logged on to server A, on 4 putty windows using SSH ... and out of these 4 logged-in sessions, in one of the sessions if i did SSH from server A to server B;
i would now have 4 putty windows sessions ... of which 3 are actively logged on to Server A while 1 putty window is actively... (2 Replies)
Hello,
I could use some help with my ssh keys and agent.
This is the issue. I have 2 different UNIX systems at work. One is the normal Solaris servers with my uid being the same throughout all the servers. I now have a different system for my desktop. A contractor came in and installed some SUN... (0 Replies)
Not specifically a mac question, but it's what I am using.
I am setting up some replication for some file shares using rsync. The problem is that I am being given a little bit of a twist - I'm supposed to use a non-admin account to do it with.
I have 2 boxes - Master and Slave with 1... (2 Replies)
Hi frnz,
I work in an environment, where I need to login to multiple UNIX sessions(Always types my password when prompted for)
I heard of ssh keys which provides us a valid authentication and that avoids us typing the password.
Now I want to generate the ssh keys and use in my... (2 Replies)
Hi,
I've generated and posted pub. keys in the source system and the target. However, it is still prompting me for the password.
Steps that I have taken.
1. Generated ssh keys : ssh-keygen. It created two files.
1. .ssh/id_rsa
2. .ssh/id_rsa.pub.
2.... (10 Replies)
I have 2 systems A and B
I need to do a passwd less authentication inorder to send a file from system B to system A automatically(using sftp)
for this i did the following
I generated ssh-keygen -t dsa on system B, copied this key(id_dsa.pub) into the authorized_keys file on system A... (1 Reply)
Hi everyone,
i wanted to generate ssh keys so that i can include the public key in the remote sever, so that for subsequent logins, i can do away with the keying in of the password. I consulted the man ssh-keygen man pages. "..Normally each user wishing to use SSH with RSA or DSA... (1 Reply)
Hello*! I have problems with public keys. On one side i have Solaris 10, and on other side is HP UNIX. I created public keys on Solaris with "ssh-keygen -t rsa", append id_rsa.pub key to ~user/.ssh/authorized_keys on remote machine, and tried to connect with ssh without password. But for some... (1 Reply)
Hello,
I'm wondering if anyone has a step-by-step instruction set for setting up ssh keys? I've gone through many of the manuals online (most seem to be from the same source) and it's a little bit unclear when the documentation is talking about the server versus the client machine. I'm missing... (1 Reply)