Question

ssh required password after reinstall operation system

Posted July 3, 2016 2.5k views
Security IPv6 Linux Commands Ubuntu 16.04

I reinstall OS from ubuntu 14.04 lts to linux mint 18.
After I generated new ssh-key:
$ ssh-keygen -t rsa

After I posted my new ssh key to settings account.
When I try to conncet

$ ssh root@n.n.n.n
it shows an error - http://pastebin.com/zj0SH6i6
My sshconfig - http://pastebin.com/2rmqTBim

After I added dsa ssh-key:
$ ssh-keygen -t dsa

And it printed me similar error.

2 comments
  • If I run:
    sudo ssh -v -l root serveripaddress

    It printed:
    OpenSSH7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips 1 Mar 2016
    debug1: Reading configuration data /etc/ssh/ssh
    config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    ssh: Could not resolve hostname serveripaddress: Name or service not known

    If I run:
    sudo ssh -v -l anboo serveripaddress

    It printed:
    OpenSSH7.2p2 Ubuntu-4ubuntu1, OpenSSL 1.0.2g-fips 1 Mar 2016
    debug1: Reading configuration data /etc/ssh/ssh
    config
    debug1: /etc/ssh/ssh_config line 19: Applying options for *
    ssh: Could not resolve hostname serveripaddress: Name or service not known

  • Anboo,

    A few questions: did you add your public key, or keys for that matter, to your root user’s authorized_keys file? Does your user, server-end, have proper permissions setup on your .ssh/ folder? Have you restart your ssh service via the command “service ssh restart,” or a reboot? Your client is clearly, lines 104 and 110, trying to use the keys you made; and then failing on lines 108 and 114.

    By the way, you public IP address , and ssh port, is pretty visible in your debug file.

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.

1 answer

This question was answered by @MichaelOjeda:

Anboo,

A few questions: did you add your public key, or keys for that matter, to your root user’s authorized_keys file? Does your user, server-end, have proper permissions setup on your .ssh/ folder? Have you restart your ssh service via the command “service ssh restart,” or a reboot? Your client is clearly, lines 104 and 110, trying to use the keys you made; and then failing on lines 108 and 114.

By the way, you public IP address , and ssh port, is pretty visible in your debug file.

View the original comment

Submit an Answer