Cannot ssh into machine although it has entry in authorized keys


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cannot ssh into machine although it has entry in authorized keys
# 1  
Old 12-05-2008
Cannot ssh into machine although it has entry in authorized keys

We rebooted one our servers, call it server A, and now it cannot ssh into another machine, call it server B. We have the server A's ssh signature in server B's authorized key. I tried to manually generate the a new key using ssh-keygen command but the key looks nothing like the old key:

It has the--------------BEGIN KEY and ----------END KEY lines. So I copy everything including these two lines into the authorized key file and nothing happens.

I am stumped and would appreciate some assistance.
# 2  
Old 12-05-2008
You dont have to have authorized keys to ssh into a server, that only if you want to not have to enter a password.

If you cannot ssh into a server at all, its probabally because sshd is not running.
# 3  
Old 12-05-2008
Quote:
Originally Posted by Ikon
You dont have to have authorized keys to ssh into a server, that only if you want to not have to enter a password.

If you cannot ssh into a server at all, its probabally because sshd is not running.
I was not clear. I can ssh into the machine but it asks for a password DESPITE having the key in the authorized_key file!
# 4  
Old 12-05-2008
I would assume you did the reboot because of some upgrades? it probabally upgraded openssh or something that would have generated a new key. Which is why it no longer matches. You just need to generate new keys and add them to known_hosts like you did the first time. You cant generate a new key and have it match the previous, that would not be a good thing.
# 5  
Old 12-05-2008
Quote:
Originally Posted by Ikon
I would assume you did the reboot because of some upgrades? it probabally upgraded openssh or something that would have generated a new key. Which is why it no longer matches. You just need to generate new keys and add them to known_hosts like you did the first time. You cant generate a new key and have it match the previous, that would not be a good thing.
Yeah I tried that but it still does not work! The only thing I can say is that in the machine I want to ssh into, it has the id_dsa.pub files for the machines that are allowedt to ssh into it without password. I doubt I have to do this but I felt like pointing it out to give all the information necessary. Any ideas? It seems like a simple cut and paste job....

I tried putting the public key for my own desktop into the Server B's authorized_key file and it worked! It just does not seem to work for Server A! Has anyone seen this type of problem before?

I do notice that Server A has:

openssh-4.3p2-24.el5
openssh-clients-4.3p2-24.el5
openssh-server-4.3p2-24.el5

and serverB has:
openssh-4.0p1-3
openssh-clients-4.0p1-3
openssh-server-4.0p1-3

Could the version differences be causing a problem? All the other machines have versions below 4.0....

Last edited by mojoman; 12-05-2008 at 02:56 PM..
# 6  
Old 12-05-2008
mojoman,


Question,

On Server A your using what user account to perform ssh to Server B? is it root account? or just ordinary users?

If user is root account? does the system prompt you for password?

If ordinary account make sure that the /home/<username> of that user in Server B is set to 700.
# 7  
Old 12-05-2008
Server A is root and trying to get into root of Server B......
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 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. Red Hat

iptables applied in local machine, can't ssh remote machine after chain changed to DROP

I want to SSH to 192.168.1.15 Server from my machine, my ip was 192.168.1.99 Source Destination was UP, with IP 192.168.1.15. This is LAN Network there are 30 Machine's Connected to the network and working fine, I'm Playing around the local machine's because I need to apply the same rules in... (2 Replies)
Discussion started by: babinlonston
2 Replies

3. Shell Programming and Scripting

List of servers that are NOT authorized for password-less SSH

Hello friends, We have around 500 servers (HPUX, AIX and linux) and all of them need to be accessed from our management box (linux) via password-less ssh. Out of 500 around 150 servers are setup password-less. We need to setup password-less SSH for remaining servers. First we need to get the... (3 Replies)
Discussion started by: magnus29
3 Replies

4. 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

5. 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

6. Shell Programming and Scripting

SSH into a linux machine from a windows machine

I basically want to login into different linux machines( on the same network) from a windows machine. I know i can use ssh <machine name>. But i want to automate this process. I dont want to enter the username and password. Is there any way to do it. Can i make some sort of a batch script for it. (4 Replies)
Discussion started by: lassimanji
4 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. Shell Programming and Scripting

adding a host entry on another machine

I have written this small script to add an entry to a remote /etc/hosts file which needs to be run from our central admin box and is passed one parameter $1 <hostname> #!/bin/ksh echo "Which host entry would you like to add to $1" read host_to_add echo "what is the IP address?" read ip ... (4 Replies)
Discussion started by: hcclnoodles
4 Replies
Login or Register to Ask a Question