2

Since I upgraded to 16.04, the following command fails:

sshpass -p password ssh user@host

with the error:

Could not create directory '/home/mylocaluser/.ssh'.

(~/.ssh folder already exists).

The following command:

ssh user@host

still works.

Before upgrade the first command used to work perfectly.

EDIT:

Discovered that .ssh directory in my home folder was only a symlink to /home/mylocaluser/Dropbox/Mockup/.ssh (and that one doesn't exist)!!! I removed the symlink and now the command sshpass still fails with no errors.

jasmines
  • 11,311

2 Answers2

2

With the last openssh upgrade, I had to reauthorize all of my connections before forwarding them to sshpass.

jasmines
  • 11,311
-1

It's possible that the folder /home/mylocaluser doesn't have the right permissions.

Try running the following commands:

sudo chown mylocaluser:mylocaluser /home/mylocaluser
sudo chmod u+rwx /home/mylocaluser

(Obviously replacing all "mylocaluser" with the appropriate username.)

The first line changes the ownership of the folder to your user and the group (also of the same name).

The second line adds the read, write, and execute (or access) permissions to the directory.

You should now be able to create a folder under that directory, which is what sshpass appears to be complaining about.