SSH keys are not working

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat SSH keys are not working
# 1  
Old 10-08-2010
Network SSH keys are not working

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. I have scp .ssh/id_rsa.pub over to target user's .ssh folder and renames to authorized_keys.

When I'm trying to do ssh to target server/user, it is still prompting me for the pass.

Any idea why?
# 2  
Old 10-08-2010
Try ssh -v or even -vv or -vvv to see what it thinks it's doing. I suspect it's either a different protocol version of ssh or the permissions of one of the files are wrong...
# 3  
Old 10-08-2010
Try this command:

Code:
ssh-copy-id <hostname or IP>

# 4  
Old 10-08-2010
Here is the result for ssh-copy-id <hostname>


/usr/bin/ssh-copy-id: ERROR: No identities found

ssh -v or ssh -vv/vvv does not recognize.
# 5  
Old 10-08-2010
Then you don't have the files in the correct location(/home/username/.ssh/), or incorrectly named, or the wrong kind of file(Try making a DSA key instead), or incorrect ownership and/or permissions on ~/.ssh/ or the files themselves. ls -l ~/.ssh/

You are running ssh -v username@host, yes? not just -v.
# 6  
Old 12-21-2010
try these

Quote:
Originally Posted by Afi_Linux
Here is the result for ssh-copy-id <hostname>


/usr/bin/ssh-copy-id: ERROR: No identities found

ssh -v or ssh -vv/vvv does not recognize.
First of all, make sure you already generate your rsa key by doing this :
ssh-keygen

and then do these 2 steps:
cd ~
ssh-copy-id .ssh/id_rsa.pub user@target-host


or these 3 steps:
ssh-agent $SHELL
ssh-add
ssh-copy-id user@target-host

in case you still need it :-)
# 7  
Old 12-25-2010
Been through this

I have been there.Please check the permissions on the directory ( probably home of user for whom you have generated keys) it has to be 700 and authorized_keys has to be 640.So if we are doing it for user xyz

Then

700 /home/xyz
700 /home/xyz/.ssh
640 /home/xyz/.ssh/authorized_keys
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies

2. Solaris

help with SSH keys

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)
Discussion started by: bitlord
0 Replies

3. UNIX for Dummies Questions & Answers

Shortcut keys are not working

Hi all, I use the shortcut keys CTRL-a and CTRL-e to move cursor to start and end of line in shell prompt alot. But recently what happened to my system i don't know only CTRL-a is working not CTRL-e . If i press CTRL-e any other window in that desktop pop's up. Can any1 tell me how to correct... (2 Replies)
Discussion started by: vio719
2 Replies

4. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

5. UNIX for Advanced & Expert Users

RSA keys are not working

Hi, We have two open SSh systems(Let us assume that A and B).These systems are having the non expiring passwords. We established a passwordless connection between two systems bu using the rsa key iles. I have created the key generated files by using the command ssh-keygen -t rsa in system A and... (1 Reply)
Discussion started by: srrao.ch
1 Replies

6. Shell Programming and Scripting

RSA keys are not working

Hi, We have two open SSh systems(Let us assume that A and B).These systems are having the non expiring passwords. We established a passwordless connection between two systems bu using the rsa key iles. I have created the key generated files by using the command ssh-keygen -t rsa in system A and... (1 Reply)
Discussion started by: srrao.ch
1 Replies

7. UNIX for Dummies Questions & Answers

SSH keys

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)
Discussion started by: new2ss
1 Replies

8. UNIX for Advanced & Expert Users

SSH Keys Help

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)
Discussion started by: sysera
1 Replies

9. Windows & DOS: Issues & Discussions

DOS Keys not working

Hi, In my MSDOS version on windows'98, many keys are not working. I feel that my version is old and I wnt to update it. Can anyone tell me how can i do so. Please tell me soon. Thanks a lot. -Kinnaree :confused: (1 Reply)
Discussion started by: kinnaree
1 Replies
Login or Register to Ask a Question