prompting for passwords even i configured ssh password less authentication

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat prompting for passwords even i configured ssh password less authentication
# 1  
Old 10-09-2012
prompting for passwords even i configured ssh password less authentication

There are two servers :

1. Site
2. Testing
from site server i want to connect testing server with ssh password less authentication.

i generated public and private keys with ssh-keygen -t rsa on site server.

cat id_rsa >> authorized_keys
cat id_rsa.pub >> authorized_keys

i appended id_rsa.pub ( public key site server ) to authorized_keys ( testing server ) with below command .

ssh oracle@testing.fgho.com "cat >> ~/.ssh/authorized_keys" < ~/.ssh/id_rsa.pub

am i missing some point in performing procedure for ssh password less authentication ?

because it prompts for passwords agaian and again

one thing i want to tell u that i am doing all above procedure with oracle user .
# 2  
Old 10-09-2012
Check the permissions on the "Testing" server .ssh directory (should be 500 or 700) and the authorized_keys file (400 or 600)
# 3  
Old 10-09-2012
on testing server permissions are as follows :

Code:
-rw-r--r-- 1 oracle oinstall  405 Oct  9 09:25 id_rsa.pub
-rw------- 1 oracle oinstall 1675 Oct  9 09:25 id_rsa
-rw-r--r-- 1 oracle oinstall 2486 Oct  9 09:27 authorized_keys
-rw-r--r-- 1 oracle oinstall  817 Oct  9 09:57 known_hosts


Last edited by Scott; 10-09-2012 at 08:32 AM.. Reason: Code tags
# 4  
Old 10-09-2012
And they're wrong. What about the .ssh directory itself? drwxr-xr-x? That too would be wrong.
# 5  
Old 10-09-2012
i could not find permissions at .ssh directory on testing server.

but now i did
chmod 700 .ssh



do i set chmod 600 authorized_keys ??
# 6  
Old 10-09-2012
Yes.

You can use the -a flag of ls to see 'hidden files'.

Or, in this case, just:
Code:
ls -ld ~/.ssh

# 7  
Old 10-09-2012
ls -ald .ssh/
drwx------ 2 oracle oinstall 4096 Oct 9 09:25 .ssh/
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run commands on remote server using ssh password less authentication?

Hi, I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this. I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies

2. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

3. Shell Programming and Scripting

Ssh is prompting for password

Hi, When i am trying to connect to other server using ssh coomand, it is prompting for password. But i want to hardcode it with username so that it should not prompt for password. And i dont want to use "ssh-keygen" method as it is not allowed. Please help me. Regards, Mukta (7 Replies)
Discussion started by: Mukta
7 Replies

4. Shell Programming and Scripting

Prompting for password

Hi, I have SVN installed in my UNIX solaris server. I actually automated the process that downloads code from SVN server to UNIX solaris server in script. When i run the script, its asking for password to download every element. Its really difficult to type password for every element when... (3 Replies)
Discussion started by: gthangav
3 Replies

5. UNIX for Dummies Questions & Answers

[SSH-RSA] Still prompting for password after generating keys

Hello, I'm trying to perform these operations without entering any password, as user "fzd":fzd@machine1> scp /tmp/srcFile1 fzd@machine2:/tmp/$destFile fzd@machine1> scp fzd@machine2:/tmp/$srcFile /tmp/$destFilebut alsofzd@machine1> scp /tmp/srcFile1 machine2:/tmp/$destFile fzd@machine1> scp... (6 Replies)
Discussion started by: fzd
6 Replies

6. UNIX for Dummies Questions & Answers

SSH Keys Authentication keeps asking for password

Hi! Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working. I created the keys in ServerA, copied them to... (7 Replies)
Discussion started by: RedSpyder
7 Replies

7. Programming

ssh via java prompting for password

Hi, I have set up my remote server for password-less login via ssh. If I run the command on my server - ssh user@remoteserver "ls -l" I get an output, but when I try to do this via java String sCmd = new String{"/usr/bin/ssh", " user@remoteserver", "\"ls -l\""}; Process p =... (3 Replies)
Discussion started by: nrworld
3 Replies

8. Red Hat

Partition encryption without prompting passwords.

Hi Gurus, I have been working on encrypting a partition in a Fedora box and have successfully encrypted a partition(By name /test) using "cryptsetup & luks". The below command was put up in a runcontrol file which is called during bootup to automount them during bootup. cat... (0 Replies)
Discussion started by: Hari_Ganesh
0 Replies

9. HP-UX

sftp/scp/ssh script with password as authentication

Hello, Do you guys know set of commands that can incorporate to sftp/scp/ssh to add password in a script to automate file transfer. Our client is not using ssh keys authentication so we are force to create a script to pass the password into the script to transfer files via sftp/scp/ssh. We... (4 Replies)
Discussion started by: james_falco
4 Replies

10. UNIX for Advanced & Expert Users

SSH - Prompting for password

Hi, Can anybody tell me a way to do ssh , without prompting for password from keyboard, Using RSA. The requirement is I need to create the key , using passphrase also..... Is there any way to do it in UNIX ? I am doing it from AIX machine , but remote machine is Linux I tried... (8 Replies)
Discussion started by: shihabvk
8 Replies
Login or Register to Ask a Question