0

I created non-sudo user and I can't add ssh key while logined with it:

% ssh -vvv add ~/.ssh/mykey   
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 *
ssh: Could not resolve hostname add: Name or service not known

Ubuntu 14.04, didn't change ssh config after clean installation.

When I add key while logined as sudo user everything is ok. I tried to do

% eval `ssh-agent -s`
Agent pid 18372

But ssh add shows the same error after this.

1 Answer 1

3

ssh -vvv add ~/.ssh/mykey will try to connect to server add and run the ~/.ssh/mykey command.

This is obviously not what you want but it certainly explains the error you're getting.

1
  • thanks, I must have used ssh-add, not ssh add. :)
    – d9k
    May 12, 2016 at 4:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .