No password ssh connect to different user


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers No password ssh connect to different user
# 1  
Old 03-11-2009
Question No password ssh connect to different user

I am trying to create a batch script to securely copy (scp or sftp) files from one machine to another. Unfortunately the files are owned by a different user than the one on my local machine.
I have already done a keygen and moved the public key to the authorized_users file of the user on the remote machine, but I can't get a connection without a password prompt. I had the SAs add the RSAAuthentication yes and Pubkey Authentication yes added to the /etc/ssh/ssh_config file too!

Any ideas?

Thanks,
Kevin
# 2  
Old 03-12-2009
Check your file permissions to make sure sshd really can access the things it needs to. When I was getting this working I ended up running sshd manually with full debug output to tell exactly what it was doing when I was trying to log in...
# 3  
Old 03-12-2009
Question Followup on permissions and settings.

Thanks Corona688. I have verified that the permissions are set the same on the remote machine meaning I have machine a (local) and machine b remote. I have user 1 on a and b and user 2 on machine b. I am able to ssh from a to b as user 1 without a password prompt. When I try to ssh from a to b as user 1 to user 2 I am prompted. I have entered the pub key of user 1 from a to the authorized_keys file of user 2 on b. The permissions on the directories and files are the same for each user 1 and 2 on b.

I did try an ssh with the -v option and the first thing it checks is the /etc/ssh/ssh_config file on machine a. The entries for RSAAuth and PubkeyAuth are not in that file, but are in the file on machine b. In other words do the permissions have to be reciprocal?

Anyway I appreciate your help! BTW Corona688 I am originally from Regina!! Small world, eh.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

How can i setup ssh password-less login for particular user?

HI Community. I was trying to create ssh password less authentication for one user called night and it's not working for me. These are the steps I followed:- I have logged into the server and issued ssh-ketgen -t rsabash-3.2$ ssh-keygen -t rsa Generating public/private rsa key pair.... (4 Replies)
Discussion started by: bentech4u
4 Replies

2. Shell Programming and Scripting

How to pass password and prompt user for IP address while doing ssh and scp?

Hi All, I want to copy /.ssh/OM.pub file from source to destination. Here source IP address, username and password is always fixed. Whereas destination server IP address, password always gets changed. From destination server :- I am trying to write a script in which it should log in to... (3 Replies)
Discussion started by: madhur.baharani
3 Replies

3. UNIX for Dummies Questions & Answers

Connect using ssh

Dear users I have a question about connecting to remote servers using terminal I can connect to one server by ssh username@domain_of_first_server.com and after logging into the above i have to connect to one more server ssh name_of_second_server bascically to be able to connect to the... (5 Replies)
Discussion started by: kevincobain2000
5 Replies

4. Shell Programming and Scripting

DB2 Connect Encrypt Password

Hi All, If someone can help me with password encryption. We have shell scripts that connect to a database using db2 connect and we have the password hardcoded in the script. Can someone let me know if there's a way to encrypt this password? I've seen alot of users suggest we create an... (3 Replies)
Discussion started by: rethymno19
3 Replies

5. UNIX for Dummies Questions & Answers

ssh to remote machine with 2nd user and password

Hi all, Really hope someone can help me, i have been trying lots of things and just cant seem to nail it - and for something that seems straight forward.... Anyway, scenario is I need to log onto a second machine (remote server) from main workstation. Once logged in I need to run a batch... (2 Replies)
Discussion started by: Hopper_no1
2 Replies

6. Linux

SSH user equivalency still prompt for password

Hi All, I've followed the exact same steps of how to setup and enable SSH user equivalent including the right permission, but when I "ssh" it still prompts for password. Could you help to see what I did wrong? I appreciate any helps. :confused: server1.com:/u01/oracle RAC1 > mkdir... (2 Replies)
Discussion started by: Beginer0705
2 Replies

7. Shell Programming and Scripting

[SSH] Need to connect to remote server as different user and without password

I have a task requiring that USER_A run a script, which connects to HOST_B as USER_B and does not ask for a password. If I am logged in on HOST_A as USER_B, I can connect to HOST_B without a password, no problem. However, if I try running ssh with the command line "ssh USER_B@HOST_B" while... (3 Replies)
Discussion started by: Totengraber
3 Replies

8. Solaris

SSH Password-less login fails on password expiry.

Hi Gurus I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails. Resetting my password reenables the keys. Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies

9. AIX

cannot connect with ssh

Hi, I have created a new user as below: useradd -g staff -s /usr/bin/ksh test2 passwd test2 <type in new password> <type in new password> and I could not login via ssh with this username while I can do it with another username. Can anyone tell anything missing? Thanks! Victor (4 Replies)
Discussion started by: victorcheung
4 Replies

10. Shell Programming and Scripting

SSH not able to connect - Need help

Hi, I am trying to connect to server using SSH command - ssh -l <username>@<server> 22 But it just hangs there.. Any suggestions to connect via SSH will be of great help! (2 Replies)
Discussion started by: Sathy153
2 Replies
Login or Register to Ask a Question