Thread: SSH Key authentification failure
if have problems using public key login server.
i've done on client system:
$ ssh-keygen -t rsa -b 4096
*keep directory
*entered passphrase twice (about 150 characters)
$ identification has been saved in /home/client/.ssh/id_rsa (and on seemed fine)
copied id_rsa.pub server
on server (in home directory):
$ mkdir .ssh (didn't exists)
$ touch .ssh/authorized_keys
$ id_rsa.pub >> .ssh/authorized_keys
$ chmod 700 .ssh/ && chmod 600 .ssh/*
die sshd_config looks this:
if want connect message:code:# package generated configuration file # see sshd_config(5) manpage details # ports, ips , protocols listen port 22 # use these options restrict interfaces/protocols sshd bind #listenaddress :: #listenaddress 0.0.0.0 protocol 2 # hostkeys protocol version 2 hostkey /etc/ssh/ssh_host_rsa_key hostkey /etc/ssh/ssh_host_dsa_key #privilege separation turned on security useprivilegeseparation yes # lifetime , size of ephemeral version 1 server key keyregenerationinterval 3600 serverkeybits 768 # logging syslogfacility auth loglevel info # authentication: logingracetime 120 permitrootlogin no strictmodes yes rsaauthentication yes pubkeyauthentication yes authorizedkeysfile %h/.ssh/authorized_keys # don't read user's ~/.rhosts , ~/.shosts files ignorerhosts yes # work need host keys in /etc/ssh_known_hosts rhostsrsaauthentication no # similar protocol version 2 hostbasedauthentication no # uncomment if don't trust ~/.ssh/known_hosts rhostsrsaauthentication #ignoreuserknownhosts yes # enable empty passwords, change yes (not recommended) permitemptypasswords no # change yes enable challenge-response passwords (beware issues # pam modules , threads) challengeresponseauthentication no # change no disable tunnelled clear text passwords passwordauthentication no # kerberos options #kerberosauthentication no #kerberosgetafstoken no #kerberosorlocalpasswd yes #kerberosticketcleanup yes # gssapi options #gssapiauthentication no #gssapicleanupcredentials yes x11forwarding yes x11displayoffset 10 printmotd no printlastlog yes tcpkeepalive yes #uselogin no #maxstartups 10:30:60 #banner /etc/issue.net # allow client pass locale environment variables acceptenv lang lc_* subsystem sftp /usr/lib/openssh/sftp-server # set 'yes' enable pam authentication, account processing, # , session processing. if enabled, pam authentication # allowed through challengeresponseauthentication , # passwordauthentication. depending on pam configuration, # pam authentication via challengeresponseauthentication may bypass # setting of "permitrootlogin without-password". # if want pam account , session checks run without # pam authentication, enable set passwordauthentication # , challengeresponseauthentication 'no'. usepam no
agent admitted failure sign using key.
permission denied (publickey).
tried 2 different keys.
anything in logs sshd ?
have tried running ssh -vvv option? e.g. ssh -vvv john@doe.com
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [lubuntu] SSH Key authentification failure
Ubuntu
Comments
Post a Comment