hello every one,
i'm trying to login to centos 7 using SSH key generated by putty gen.but every time i login the centos asks for password.below are my steps. please help me.
1. generating apair key by using putty gen
2. create /root/.ssh/authorized_keys
3.chmod 700 .ssh
chmod 600 .ssh/authorized_keys
4. copy public key to authorized_keys
ssh key login centos 7
Re: ssh key login centos 7
Make sure your permissions are still OK after copying the public key in place (if you cp it instead of pasting the key into the file)
Also, make sure your SELinux contexts are OK. Try restorecon -v -R /root/.ssh
If this does not help, what does grep ^PermitRootLogin /etc/ssh/sshd_config output?
The server's /var/log/secure and/or /var/log/messages may also have some hints of the problem.
Also, make sure your SELinux contexts are OK. Try restorecon -v -R /root/.ssh
If this does not help, what does grep ^PermitRootLogin /etc/ssh/sshd_config output?
The server's /var/log/secure and/or /var/log/messages may also have some hints of the problem.
Re: ssh key login centos 7
Run ssh -vvvv mysshserver to turn debug on.
See anything interesting in log?
See anything interesting in log?