SSH Prompts for Password After Keys Setup Successfully


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat SSH Prompts for Password After Keys Setup Successfully
# 1  
Old 06-09-2009
SSH Prompts for Password After Keys Setup Successfully

I setup the keys between 2 servers, but my user account has no password specified for it (never set one up on the account for security reasons). When I try to SSH to the server, SSH prompts for a password that doesn't exist (so I can never connect successfully).

Note: 'passwd -d Rynok' removes the password & disables the account (this allows SSH to work correctly, but unfortunately this is also a security risk)

Summary (for you quick readers):
SSH Keys Setup so that Rynok@ServerA->Rynok@ServerB
No password is set on 'Rynok' user.
SSH Prompts for a Password.
I set a password on 'Rynok@ServerB'
SSH Works w/o a Prompt!

Any idea why it only prompts me because there is no password set?
Is this normal/expected behavior?
Can I change a config so this doesn't happen?

Last edited by Rynok; 06-09-2009 at 04:05 PM..
# 2  
Old 06-09-2009
set a dummy password
# 3  
Old 06-09-2009
Yes, obviously setting a password fixes the problem. (See: Summary)

I was hoping that wasn't the only solution though, because I have to leave my user account the way it is.
# 4  
Old 06-28-2009
Passwordless ssh

I'm assuming you are talking about setting up passwordless ssh between accounts on two systems.

If that is the case you can try the following:

Run
Code:
 ssh-keygen -t dsa -N ""

on your source host in the .ssh directory (creates a key with No Passphrase... notice the empty double quote string).
2.
Code:
cp $HOME/.ssh/id_dsa.pub $HOME/.ssh/authorized_keys2

on your remote host

3. Delete the existing .known_hosts file. Once removed they will be added again with new key information once you first attempt to login into the host for the first time with you new keys in place.

4. Test the setup by trying to run an ssh command from the local host to remote host. For example, from the local host type: ssh <remote-host> ls /tmp


Let me know if that is what you were trying to do and if this helps.

-Outervillage

Quote:
Originally Posted by Rynok
I setup the keys between 2 servers, but my user account has no password specified for it (never set one up on the account for security reasons). When I try to SSH to the server, SSH prompts for a password that doesn't exist (so I can never connect successfully).

Note: 'passwd -d Rynok' removes the password & disables the account (this allows SSH to work correctly, but unfortunately this is also a security risk)

Summary (for you quick readers):
SSH Keys Setup so that Rynok@ServerA->Rynok@ServerB
No password is set on 'Rynok' user.
SSH Prompts for a Password.
I set a password on 'Rynok@ServerB'
SSH Works w/o a Prompt!

Any idea why it only prompts me because there is no password set?
Is this normal/expected behavior?
Can I change a config so this doesn't happen?

Last edited by vbe; 06-29-2009 at 06:00 AM.. Reason: rm URL
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Help with password 'maintenance' or maybe I just need to generate ssh keys?

Hi gurus, I am NOT the SA of the servers so very limited on what I can do. Basically the scenario is like this: Every 6 months our password expires and we have to reset them to comply to some password rules. Thing is users, me included, tend to have plaintext copy of this difficult to... (2 Replies)
Discussion started by: newbie_01
2 Replies

2. Red Hat

SSH password less setup asking for password

Hello Experts, when I am trying to connect my target server through sftp after creating ssh password less setup, it is asking for passowrd to connect. to setup this I followed below process: -->generated keys by executing the command "ssh-keygen -t rsa" -->this created my .ssh directory... (9 Replies)
Discussion started by: Devipriya Ch
9 Replies

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

4. Shell Programming and Scripting

SFTP or scp with password in a batch script without using SSH keys and expect script

Dear All, I have a requirement where I have to SFTP or SCP a file in a batch script. Unfortunately, the destination server setup is such that it doesn't allow for shell command line login. So, I am not able to set up SSH keys. My source server is having issues with Expect. So, unable to use... (5 Replies)
Discussion started by: ss112233
5 Replies

5. Linux

Linux password aging and ssh keys

Recently I have been playing with password ageing and the usage of ssh keys. I have found that if usePAM yes (default) is set in the /etc/ssh/sshd_config file then any password ageing and inactiivity can adversely affect a client with ssh keys. For example: Set PASS_MAX_DAYS to 60 in... (5 Replies)
Discussion started by: smurphy_it
5 Replies

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

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

8. AIX

ssh keys - no password prompt from AIX to RPA

hello, i am running an AIX 5.3 machine and i want to connect via ssh to the RPA Management site without prompting for password. i already had a public key of this server as i use the same thing for ssh connection with other AIX machines. i connected to the RPA Management Site and i run the... (9 Replies)
Discussion started by: omonoiatis9
9 Replies

9. Shell Programming and Scripting

ssh foo.com sudo command - Prompts for sudo password as visible text. Help?

I am writing a BASH script to update a webserver and then restart Apache. It looks basically like this: #!/bin/bash rsync /path/on/local/machine/ foo.com:path/on/remote/machine/ ssh foo.com sudo /etc/init.d/apache2 reloadrsync and ssh don't prompt for a password, because I have DSA encryption... (9 Replies)
Discussion started by: fluoborate
9 Replies

10. UNIX for Advanced & Expert Users

SSH prompts password for non identical users

host1 & host2 : Solaris 10 - SPARC server From host1 able to ssh to host2 as same user with out password prompt. But, when ssh to different user in host2, it prompts for password DETAILS ======= In host1: 1) logged as root 2) ssh-keygen -t dsa -b 1024 (no pass phrase) 3)... (5 Replies)
Discussion started by: vjkatsun
5 Replies
Login or Register to Ask a Question