Question
Can't connect with ssh with Ubuntu
Connection closed by 107.170.80.75
ssh -vvvv root@107.170.80.75
OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 107.170.80.75 [107.170.80.75] port 22.
debug1: Connection established.
debug3: Incorrect RSA1 identifier
debug3: Could not load "/home/kedinn/.ssh/id_rsa" as a RSA1 public key
debug1: identity file /home/kedinn/.ssh/id_rsa type -1
debug1: identity file /home/kedinn/.ssh/id_rsa-cert type -1
debug1: identity file /home/kedinn/.ssh/id_dsa type -1
debug1: identity file /home/kedinn/.ssh/id_dsa-cert type -1
debug1: identity file /home/kedinn/.ssh/id_ecdsa type -1
debug1: identity file /home/kedinn/.ssh/id_ecdsa-cert type -1
debug1: identity file /home/kedinn/.ssh/id_ed25519 type -1
debug1: identity file /home/kedinn/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2.6
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.6.1p1 Ubuntu-2ubuntu2
debug1: match: OpenSSH_6.6.1p1 Ubuntu-2ubuntu2 pat OpenSSH_6.6.1* compat 0x04000000
debug2: fd 3 setting O_NONBLOCK
debug3: load_hostkeys: loading entries for host "107.170.80.75" from file "/home/kedinn/.ssh/known_hosts"
debug3: load_hostkeys: loaded 0 keys
debug1: SSH2_MSG_KEXINIT sent
Connection closed by 107.170.80.75
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
@kedinnturpo - Does the file ~kedinn/.ssh/id_rsa.pub exist on the client machine? Is the content of that file one of the lines in the file ~root/.ssh/authorized_keys on the server machine?
/home/kedinn/.ssh/id_rsa is my cliente ubuntu/
in root/.ssh/authorized_keys on the server machine, i have deleted
@kedinnturpo - Read the DO tutorial on setting up your ssh key.
I had this problem as well and followed this here https://www.digitalocean.com/community/tutorials/how-to-use-ssh-keys-with-digitalocean-droplets
You need to add a user while logged in as root. You can always login in as root from your DO account using the console there. To log in from your local terminal then ssh to the newuser account which needs to have sudo privileges, e.g. using sudo adduser <username> sudo.
You can’t access root directly from the terminal once ssh keys have been enabled. Always go via a user account and sudo to make changes to root.