Troubleshooting ssh login
by anothernoname from LinuxQuestions.org on (#6E79S)
Hello,
I`m trying to do the following lab (https://killercoda.com/pawelpiwosz/c...lt-02-machine2 ). I`m having some issue for user06 and user09.
For the user06 I have the following issue:
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: Could not open authorized keys '/home/user06/.ssh/authorized_keys': Permission denied
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: restore_uid: 0/0
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: temporarily_use_uid: 1006/1006 (e=0/0)
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: trying public key file /home/user06/.ssh/authorized_keys2
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: Could not open authorized keys '/home/user06/.ssh/authorized_keys2': Permission denied
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: restore_uid: 0/0
Aug 27 16:57:23 ubuntu sshd[23076]: debug3: mm_answer_keyallowed: publickey authentication test: ED25519 key is not allowed
Aug 27 16:57:23 ubuntu sshd[23076]: Failed publickey for user06 from 127.0.0.1 port 40068 ssh2: ED25519 SHA256:wnHTWpvwFsCXaBTXUDUDCjs23ndHpFxvoMpwIiNnV
( tried sshd -T it seems that ssh-ed25519 it`s enabled )
hostkeyagent none
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256
hostbasedacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh...01@openssh.com,ecdsa-sha2-nist
I`ve done the following:
chmod 0700 .ssh
chmod 0600 .ssh/authorized_keys
(although the permissions seem to be alright )
vi /etc/ssh/sshd_config ( adding LogLevel DEBUG3 )
systemctl restart sshd
ssh -i .ssh/machine2 user06@localhost
For the user09: The authorized_keys file doesn`t have the right syntax but no matter what I do I can`t edit the godamn file. Even as root, even as user09 no matter what command I use I get file not found while the file it`s clearly there. ( seems to be something like chattr +i but lsattr doesn`t work :D )
Any hints please ? Thank you !
I`m trying to do the following lab (https://killercoda.com/pawelpiwosz/c...lt-02-machine2 ). I`m having some issue for user06 and user09.
For the user06 I have the following issue:
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: Could not open authorized keys '/home/user06/.ssh/authorized_keys': Permission denied
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: restore_uid: 0/0
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: temporarily_use_uid: 1006/1006 (e=0/0)
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: trying public key file /home/user06/.ssh/authorized_keys2
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: Could not open authorized keys '/home/user06/.ssh/authorized_keys2': Permission denied
Aug 27 16:57:23 ubuntu sshd[23076]: debug1: restore_uid: 0/0
Aug 27 16:57:23 ubuntu sshd[23076]: debug3: mm_answer_keyallowed: publickey authentication test: ED25519 key is not allowed
Aug 27 16:57:23 ubuntu sshd[23076]: Failed publickey for user06 from 127.0.0.1 port 40068 ssh2: ED25519 SHA256:wnHTWpvwFsCXaBTXUDUDCjs23ndHpFxvoMpwIiNnV
( tried sshd -T it seems that ssh-ed25519 it`s enabled )
hostkeyagent none
kexalgorithms curve25519-sha256,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group14-sha256
casignaturealgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,ssh-ed25519,sk-ssh-ed25519@openssh.com,rsa-sha2-512,rsa-sha2-256
hostbasedacceptedkeytypes ecdsa-sha2-nistp256-cert-v01@openssh...01@openssh.com,ecdsa-sha2-nist
I`ve done the following:
chmod 0700 .ssh
chmod 0600 .ssh/authorized_keys
(although the permissions seem to be alright )
vi /etc/ssh/sshd_config ( adding LogLevel DEBUG3 )
systemctl restart sshd
ssh -i .ssh/machine2 user06@localhost
For the user09: The authorized_keys file doesn`t have the right syntax but no matter what I do I can`t edit the godamn file. Even as root, even as user09 no matter what command I use I get file not found while the file it`s clearly there. ( seems to be something like chattr +i but lsattr doesn`t work :D )
Any hints please ? Thank you !