I am trying to setup SSH public keys to login to my GoFlex Home 2TB. These are the steps I took

  1. Copy my public key to /home/user/.ssh/authorized_keys
  2. Modify /etc/ssh/sshd_config to allow public key authentication and point to the authorized_keys file
  3. End the SSH session
  4. login to goflexhome.loal and reboot the NAS device

Details of the client system:

  • OS: Linux Mint 17.3
  • Network type: LAN (Ethernet)

Details of the host system (NAS)

  • OS: hipserv2 (Linux based by Seagate, default OS in GoFlex Home)

When I try to initiate the ssh session I get a password prompt instead of using my private key to login

File Permissions at /home/user/.ssh

-bash-3.2$ ls -la
total 4
drwxr-xr-x 2 user root 232 Mar 18 16:49 .
dr-xr-x--- 7 user www  616 Mar 18 16:48 ..
-rwxr-xr-x 1 user root 746 Mar 18 16:49 authorized_keys

SSH verbose

Redirect to PasteBin

  • 1
    did you tried ssh in verbose mode to see if keys are used at all, or just rejected: ssh -vvv user@server. Check also ownership of your .ssh directory. – marc Mar 18 '16 at 18:53
  • 1
    You think when you say GoFlex NAS, everyone knows what it is and probably 99% of people here don't. So, let's start with some questions: Where are you trying to login from: A Widows PC or Linux terminal ? When you say you modified sshd_config are you referring to this file residin on your NAS or your local machine ? Also please post the output of this command, run on the NAS device ls -al /home/user/.ssh – MelBurslan Mar 18 '16 at 18:54
  • On hipserv2 system, do you have a login, if you do, login to this box and please post the output from ls -al /home/user/.ssh where user needs to be replaced by your username on hipserv2 box – MelBurslan Mar 18 '16 at 20:01
  • Hi @MelBurslan, I've updated the OP – Lordbalmon Mar 18 '16 at 20:52
  • @mmmint, I've updated the OP with the verbose output, my system prompts me for the keyphrase but continues on to the password validation – Lordbalmon Mar 19 '16 at 1:27

on hipserve2 machine, please run

chmod 700 /home/user/.ssh
chmod 600 /home/user/.ssh/authorized_keys

and try again

|improve this answer|||||
  • Thank you for the response but changing the permissions did not work. – Lordbalmon Mar 19 '16 at 1:57

First, check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.

In the past I came across some tutorials that describe how to achieve a ssh password-less setup, but some are sadly wrong.
Let's start over again, and check every step:

  1. FROM CLIENT - Generate key: ssh-keygen -t rsa
    Public and private key (id_rsa.pub and id_rsa) will be automatically stored in the ~/.ssh/ directory.
    Setup will be easier if you use an empty passphrase. If you are not willing to do that, then still follow this guide, but also check the bullet point below.

  2. FROM CLIENT - Copy public key to server : ssh-copy-id user@server
    Client public key will be copied to server's location ~/.ssh/authorized_keys.

  3. FROM CLIENT - Connect to server: ssh user@server

Now, if it's still not working after the described 3 steps, lets try the following:

  • Check ~/ssh folder permissions in client and server machine.
  • Check /etc/ssh/ssd_config in the server to ensure that RSAAuthentication, PubkeyAuthentication and UsePAM options aren't disabled, as they are enabled by default with yes.
  • If you entered a passphrase while generating your client key, then you may try ssh-agent & ssh-add to achieve password-less connections in your session.
  • Check the contents of /var/log/auth.log on the server to find the issue why key authentication is skipped at all.
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.