Not able to do passwordless ssh from one user to another machine same user.

Latest response

hello,
i am not able to do password less ssh from one machine user to another user.
steps i did .
su - username
ssh-keygen
enter
enter
enter
ssh-copy-id -i username@ip

still have the same issue

Responses

Hi Yogesh,

Does that mean you could do ssh successfully and login by entering password, however, password less login to same user is not working? If so, try to capture verbose output of ssh command paste the results here (you would need to run ssh -v , to increase verbosity add one more 'v').

Also, you may try removing/deleting the 'authorized_keys' file under respective users home directory on destination and then execute 'ssh-copy-id' again and test. NOTE: There may be multiple keys in this file, so, you would need to check and delete respective key, also, better you take backup of this file first before attempting to edit it. So, if any chance the file gets corrupted/broken you could restore it from backup.

All the best!

It's worth noting that ssh-keygen actually has an option for deleting a particular key from the default authorized_keys file:

ssh-keygen -R <hostname> 

(Note the upper case R)

It may be safer than messing around in the file with an editor.

This also creates a backup file, but note that it will be overwritten by next backup each time you run the command.

Yes, that is a handy option, thanks Terje.

OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 51: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 10.215.79.136 [10.215.79.136] port 22. debug1: Connection established. debug1: identity file /EoffApp/.ssh/id_rsa type 1 debug1: identity file /EoffApp/.ssh/id_rsa-cert type -1 debug1: identity file /EoffApp/.ssh/id_dsa type -1 debug1: identity file /EoffApp/.ssh/id_dsa-cert type -1 debug1: identity file /EoffApp/.ssh/id_ecdsa type -1 debug1: identity file /EoffApp/.ssh/id_ecdsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.4 debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4 debug1: match: OpenSSH_6.4 pat OpenSSH* debug2: fd 3 setting O_NONBLOCK debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 debug2: kex_parse_kexinit: ssh-rsa,ecdsa-sha2-nistp256 debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96 debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: none,zlib@openssh.com debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: debug2: kex_parse_kexinit: first_kex_follows 0 debug2: kex_parse_kexinit: reserved 0 debug2: mac_setup: found hmac-md5-etm@openssh.com debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none debug2: mac_setup: found hmac-md5-etm@openssh.com debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none debug1: sending SSH2_MSG_KEX_ECDH_INIT debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: Server host key: ECDSA be:d6:8a:33:1c:06:37:55:9b:9d:e0:b9:9a:b6:f8:dd debug1: Host '10.215.79.136' is known and matches the ECDSA host key. debug1: Found key in /EoffApp/.ssh/known_hosts:5 debug1: ssh_ecdsa_verify: signature correct debug2: kex_derive_keys debug2: set_newkeys: mode 1 debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug2: set_newkeys: mode 0 debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug2: service_accept: ssh-userauth debug1: SSH2_MSG_SERVICE_ACCEPT received debug2: key: /EoffApp/.ssh/id_rsa (0x7fea09c010d0), debug2: key: /EoffApp/.ssh/id_dsa ((nil)), debug2: key: /EoffApp/.ssh/id_ecdsa ((nil)), debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: gssapi-keyex debug1: No valid Key exchange context debug2: we did not send a packet, disable method debug1: Next authentication method: gssapi-with-mic debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address

debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address

debug1: Unspecified GSS failure. Minor code may provide more information

debug1: Unspecified GSS failure. Minor code may provide more information Cannot determine realm for numeric host address

debug2: we did not send a packet, disable method debug1: Next authentication method: publickey debug1: Offering RSA public key: /EoffApp/.ssh/id_rsa debug2: we sent a publickey packet, wait for reply debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Trying private key: /EoffApp/.ssh/id_dsa debug1: Trying private key: /EoffApp/.ssh/id_ecdsa debug2: we did not send a packet, disable method debug1: Next authentication method: password eoffice@10.215.79.136's password: debug2: we sent a password packet, wait for reply debug1: Authentication succeeded (password). Authenticated to 10.215.79.136 ([10.215.79.136]:22). debug1: channel 0: new [client-session] debug2: channel 0: send open debug1: Requesting no-more-sessions@openssh.com debug1: Entering interactive session. debug2: callback start debug2: fd 3 setting TCP_NODELAY debug2: client_session2_setup: id 0 debug2: channel 0: request pty-req confirm 1 debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 debug2: channel 0: request env confirm 0 debug2: channel 0: request shell confirm 1 debug2: callback done debug2: channel 0: open confirm rwindow 0 rmax 32768 debug2: channel_input_status_confirm: type 99 id 0 debug2: PTY allocation request accepted on channel 0 debug2: channel 0: rcvd adjust 2097152 debug2: channel_input_status_confirm: type 99 id 0 debug2: shell request accepted on channel 0 Last login: Wed Jun 20 19:15:25 2018 from eofficeapp

Please format your log file input. Add these lines between ~~~ and ~~~ so it looks good.

OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013~~~~~~~ debug1: Reading configuration data /etc/ssh/ssh_config~~~~~~~ debug1: /etc/ssh/ssh_config line 51: Applying options for ~~~~~~~ debug2: ssh_connect: needpriv 0~~~~~~~ debug1: Connecting to 10.215.79.136 [10.215.79.136] port 22.~~~~~~~ debug1: Connection established.~~~~~~~ debug1: identity file /EoffApp/.ssh/id_rsa type 1~~~~~~~ debug1: identity file /EoffApp/.ssh/id_rsa-cert type -1~~~~~~~ debug1: identity file /EoffApp/.ssh/id_dsa type -1~~~~~~~ debug1: identity file /EoffApp/.ssh/id_dsa-cert type -1~~~~~~~ debug1: identity file /EoffApp/.ssh/id_ecdsa type -1~~~~~~~ debug1: identity file /EoffApp/.ssh/id_ecdsa-cert type -1~~~~~~~ debug1: Enabling compatibility mode for protocol 2.0~~~~~~~ debug1: Local version string SSH-2.0-OpenSSH_6.4~~~~~~~ debug1: Remote protocol version 2.0, remote software version OpenSSH_6.4~~~~~~~ debug1: match: OpenSSH_6.4 pat OpenSSH~~~~~~~ debug2: fd 3 setting O_NONBLOCK~~~~~~~ debug1: SSH2_MSG_KEXINIT sent~~~~~~~ debug1: SSH2_MSG_KEXINIT received~~~~~~~ debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1~~~~~~~ debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa-cert-v01@openssh.com,ssh-dss-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-rsa,ssh-dss~~~~~~~ debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se~~~~~~~ debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se~~~~~~~ debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96~~~~~~~ debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96~~~~~~~ debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib~~~~~~~ debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib~~~~~~~ debug2: kex_parse_kexinit:~~~~~~~ debug2: kex_parse_kexinit:~~~~~~~ debug2: kex_parse_kexinit: first_kex_follows 0~~~~~~~ debug2: kex_parse_kexinit: reserved 0~~~~~~~ debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1~~~~~~~ debug2: kex_parse_kexinit: ssh-rsa,ecdsa-sha2-nistp256~~~~~~~ debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se~~~~~~~ debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se~~~~~~~ debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96~~~~~~~ debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96~~~~~~~ debug2: kex_parse_kexinit: none,zlib@openssh.com~~~~~~~ debug2: kex_parse_kexinit: none,zlib@openssh.com~~~~~~~ debug2: kex_parse_kexinit:~~~~~~~ debug2: kex_parse_kexinit:~~~~~~~ debug2: kex_parse_kexinit: first_kex_follows 0~~~~~~~ debug2: kex_parse_kexinit: reserved 0~~~~~~~ debug2: mac_setup: found hmac-md5-etm@openssh.com~~~~~~~ debug1: kex: server->client aes128-ctr hmac-md5-etm@openssh.com none~~~~~~~ debug2: mac_setup: found hmac-md5-etm@openssh.com~~~~~~~ debug1: kex: client->server aes128-ctr hmac-md5-etm@openssh.com none~~~~~~~ debug1: sending SSH2_MSG_KEX_ECDH_INIT~~~~~~~ debug1: expecting SSH2_MSG_KEX_ECDH_REPLY~~~~~~~ debug1: Server host key: ECDSA be:d6:8a:33:1c:06:37:55:9b:9d:e0:b9:9a:b6:f8:dd~~~~~~~ debug1: Host '10.215.79.136' is known and matches the ECDSA host key.~~~~~~~ debug1: Found key in /EoffApp/.ssh/known_hosts:5~~~~~~~ debug1: ssh_ecdsa_verify: signature correct~~~~~~~ debug2: kex_derive_keys~~~~~~~ debug2: set_newkeys: mode 1~~~~~~~ debug1: SSH2_MSG_NEWKEYS sent~~~~~~~ debug1: expecting SSH2_MSG_NEWKEYS~~~~~~~ debug2: set_newkeys: mode 0~~~~~~~ debug1: SSH2_MSG_NEWKEYS received~~~~~~~ debug1: Roaming not allowed by server~~~~~~~ debug1: SSH2_MSG_SERVICE_REQUEST sent~~~~~~~ debug2: service_accept: ssh-userauth~~~~~~~ debug1: SSH2_MSG_SERVICE_ACCEPT received~~~~~~~ debug2: key: /EoffApp/.ssh/id_rsa (0x7fea09c010d0),~~~~~~~ debug2: key: /EoffApp/.ssh/id_dsa ((nil)),~~~~~~~ debug2: key: /EoffApp/.ssh/id_ecdsa ((nil)),~~~~~~~ debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password~~~~~~~ debug1: Next authentication method: gssapi-keyex~~~~~~~ debug1: No valid Key exchange context~~~~~~~ debug2: we did not send a packet, disable method~~~~~~~ debug1: Next authentication method: gssapi-with-mic~~~~~~~ debug1: Unspecified GSS failure. Minor code may provide more information~~~~~~~ Cannot determine realm for numeric host address~~~~~~~

debug1: Unspecified GSS failure. Minor code may provide more information~~~~~~~ Cannot determine realm for numeric host address~~~~~~~

debug1: Unspecified GSS failure. Minor code may provide more information~~~~~~~

debug1: Unspecified GSS failure. Minor code may provide more information~~~~~~~ Cannot determine realm for numeric host address~~~~~~~

debug2: we did not send a packet, disable method~~~~~~~ debug1: Next authentication method: publickey~~~~~~~ debug1: Offering RSA public key: /EoffApp/.ssh/id_rsa~~~~~~~ debug2: we sent a publickey packet, wait for reply~~~~~~~ debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password~~~~~~~ debug1: Trying private key: /EoffApp/.ssh/id_dsa~~~~~~~ debug1: Trying private key: /EoffApp/.ssh/id_ecdsa~~~~~~~ debug2: we did not send a packet, disable method~~~~~~~ debug1: Next authentication method: password~~~~~~~ eoffice@10.215.79.136's password:~~~~~~~ debug2: we sent a password packet, wait for reply~~~~~~~ debug1: Authentication succeeded (password).~~~~~~~ Authenticated to 10.215.79.136 ([10.215.79.136]:22).~~~~~~~ debug1: channel 0: new [client-session]~~~~~~~ debug2: channel 0: send open~~~~~~~ debug1: Requesting no-more-sessions@openssh.com~~~~~~~ debug1: Entering interactive session.~~~~~~~ debug2: callback start~~~~~~~ debug2: fd 3 setting TCP_NODELAY~~~~~~~ debug2: client_session2_setup: id 0~~~~~~~ debug2: channel 0: request pty-req confirm 1~~~~~~~ debug1: Sending environment.~~~~~~~ debug1: Sending env LANG = en_US.UTF-8~~~~~~~ debug2: channel 0: request env confirm 0~~~~~~~ debug2: channel 0: request shell confirm 1~~~~~~~ debug2: callback done~~~~~~~ debug2: channel 0: open confirm rwindow 0 rmax 32768~~~~~~~ debug2: channel_input_status_confirm: type 99 id 0~~~~~~~ debug2: PTY allocation request accepted on channel 0~~~~~~~ debug2: channel 0: rcvd adjust 2097152~~~~~~~ debug2: channel_input_status_confirm: type 99 id 0~~~~~~~ debug2: shell request accepted on channel 0~~~~~~~ Last login: Wed Jun 20 19:15:25 2018 from eofficeapp~~~~~~~

I guess you've not understood what I told before. Let me make it simple, you would need to start the beginning of line with 3 symbols (~~~) and then insert text in between and then end the line with again 3 symbols. Say for example, if I wish to insert some command output then I'll do like this:

[root@ansi-host ~]# rpm -q --last kernel
kernel-3.10.0-514.el7.x86_64                  Thu 08 Jun 2017 08:27:43 AM EDT
kernel-3.10.0-229.el7.x86_64                  Tue 10 Jan 2017 06:58:00 AM EST

So, the above output I've formatted it and the text is pasted between "~~~" as it looks neat.

hey sadashiv,

tried deleting that authorised file , still the same issue.. we have changed the home directory of that user by the way is that the reason for the issue causing

Yes, that could be the reason. Make sure the files under ~/.ssh folder holds proper permissions. You may refer to any users default file/directory permissions of .ssh and make sure it is set accordingly. It looks like that it was unable to read the key files.

checked with another server still the same issue..

Hi Yogesh,

For your convenience, these are the appropriate permissions for the files in the ssh folder Sadashiva mentioned :

chmod 600 /home/<your-user-name>/.ssh/id_rsa
chmod 644 /home/<your-user-name>/.ssh/id_rsa.pub

Also, please format terminal outputs properly, as you were asked to do by Sadashiva, the text is a pain to read. :)

Regards,
Christian

tr -s "~" "\012" is your friend after copy-paste of text

Hi Siem, you're confusing me (hahaha) ... do you mean I should have better done it like this ?

chmod 600 ~/.ssh/id_rsa
chmod 644 ~/.ssh/id_rsa.pub

Cheers :)
Christian

I meant the "the text is a pain to read" part. :)

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.