New answers tagged

2

The problem is definitely not your key; it's most likely the server's Diffie-Hellman parameters -- or possibly their DSA key, but not too many people use DSA keys for SSH, especially since OpenSSH deprecated them recently. It might be worth taking a network trace to see exactly when the error is occurring: on initial negotiation of e.g. group14; or ...


1

Connect with ssh -v user@host and you will have more information. Usually the .ssh folder and authorized_keys permissions cause trouble in these settings. I use ssh-copy-id to authorize keys in remote hosts.


3

First off, you should not be shelling into your remote server as root! Even with key authentication. The safer thing to do is to create another, normal user and add them to sudoers (use the visudo command for this). Then disable login as root using sudo passwd -l root Then you need to edit your /etc/ssh/sshd_config file to enable pubkey authentication. Find ...


-2

Typically you want the .ssh directory permissions to be 700 (drwx------) and the public key (.pub file) to be 644 (-rw-r--r--). Your private key (id_rsa) should be 600 (-rw-------). enter link description here Source


2

Hint 1: gpg calls private keys 'secret' because PGP dates from before people settled on the names 'private' key for the half of an asymmetric pair held by (ideally) only one party versus 'secret' key for a symmetric value usually held by two or more mutually trusting parties but nobody else. man gpg2 | less "+/export-secret" then n (go to second match) ...


0

Permissions of ~/.ssh/authorized_keys in remote is important (600 for my systems RHEL and Solaris) Permissions of you home directory in remote is important (700 in my systems) At the end run sshd in remote machine in debug mode on another port can be helpful: sudo /usr/sbin/sshd -p 5555 -dd 5555 is an example port, you can change it. For more info in ...



Top 50 recent answers are included