LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ssh to redhat from solaris without passwd (https://www.linuxquestions.org/questions/linux-newbie-8/ssh-to-redhat-from-solaris-without-passwd-752664/)

eaivision 09-04-2009 09:56 AM

ssh to redhat from solaris without passwd
 
Hello everyone,

I am trying to ssh to a Redhat server from a Solaris 10 without password.
I have generated the keys on my Solaris box and copied to the Redhat box in .ssh/authorized_keys but it still asks for the password while login.

Pls help.

Thanks,
Raj

prasanta 09-04-2009 10:00 AM

Quote:

in .ssh/authorized_keys but it still asks for the password while login.
When you generate the keys don't assign any passphrase. When it ask's for the passphrase, just press the enter key. Copy the keys as you have done earlier.

Regards,

--
Prasanta

eaivision 09-04-2009 10:42 AM

Thanks Prashant but thats what I had done, I had pressed enter when it asked for parphrase and copied to the destination server. But that has not worked for me.

Raj

carters2 09-04-2009 01:08 PM

So on the Solaris Server you want to do the following

ssh-keygen

usually the default storage location for the keys are fine. In this case /root/.ssh/id_rsa

Leave the passphrases blank

Now move the public key to the Red Hat machine

scp /root/.ssh/id_rsa.pub root@<ip address>:~/.ssh/

Now jump on the Red Hat machine and load the keys in.

cd /root/.ssh/
cat id_rsa.pub >> authorized_keys


Now get back on the solaris machine and try to ssh into the redhat machine

ssh root@<ip_address>

done!

Hope this helps

TomBombadil 09-29-2009 12:43 PM

Permissions
 
make sure that your permissions are set properly
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*

ssh enforces that the source host(private) and destination host(public) keys are accessible only by the owner.

chrism01 09-29-2009 08:27 PM

Check the /etc/ssh/sshd_config settings on the target; most people disallow root to login via ssh for security reasons. Also check it expects to use keys and not passwd.
http://www.linuxtopia.org/online_boo...er-config.html

Smartpatrol 09-29-2009 11:01 PM

...

linuxlover.chaitanya 09-30-2009 12:17 AM

You need to disable the authentication via password in sshd.conf file.


All times are GMT -5. The time now is 11:53 AM.