0
I have followed the process of creating the public and private keys so that I can login in to remote system without a password.
But I would like to login into the remote system as root user without password using SSH keys.
For example, vm2$ssh vm1@10.0.0.1
would give me vm1$
prompt but I need ssh vm1@10.0.0.1
to give me vm1#
.
Is this possible?
ssh-copy-id -i ~/.ssh/id_rsa root@10.0.0.1
when I am giving this command and entering the password its showingPermission Denied, please try again
– karra – 2018-12-01T12:12:23.420@karra You'll need to enter the root password, or try something else (I'll add it later). – iBug – 2018-12-01T12:13:23.987
Sorry if its naive. The password for
$sudo -s
and the root password are same. right ? – karra – 2018-12-01T12:15:50.083@karra yeah it is, but you need the root password of the remote machine – iBug – 2018-12-01T12:16:20.733
yes, I am entering the remote machine password. I have even checked on the remote machine – karra – 2018-12-01T12:17:22.257
@karra Then it's possible that the remote machine has disabled root login. Check
/etc/ssh/sshd_config
on the remote machine and look forPermitRootLogin
. Change it toyes
to add your key, and change it toprohibit-password
after you're done. – iBug – 2018-12-01T12:18:43.977Info: 1 key(s) remain to be installed
and I am getting permission denied. Initially, I have changed it to yes and then tried.StrictModes
is this related to this configuration ? – karra – 2018-12-01T12:37:19.303