2

I am trying to use sshfs to mount a directory on an AWS instance from Ubuntu 16.04.

The command I am using:

sshfs -o IdentityFile=keyfile.pem [email protected]:/var/www sshfs/

Result (with -o sshfs_debug)

SSHFS version 2.5
read: Connection reset by peer

/var/log/secure entry on AWS instance after attempting to connect:

May 10 00:00:33 ip-X-X-X-X sshd[19114]: Connection closed by X.X.X.X [preauth]

I tested with a different VPS I run personally and I am able to use sshfs fine, and I have no issues using ssh regularly into this server.

The instance was created using amzn-ami-hvm-2015.09.0.x86_64-gp2 (ami-cd3aff89)

1 Answer 1

5

I had to use some additional debugging flags to identify the problem, as just -o sshfs_debug didn't cut it:

-o sshfs_debug -o debug -o LogLevel=DEBUG3

This led me to the very verbose ouput that finally got me what I needed to know to solve my problem. The IdentityFile switch does not work out of the current directory, and I had to supply the entire path to the file thusly:

sshfs -o IdentityFile=/home/anna/keyfile.pem [email protected]:/var/www sshfs/
1
  • 1
    I figured it out while looking at a bunch of similar stuff that did not have my problem but I already did all that typing so please enjoy and I hope this helps someone!
    – Anna
    May 10, 2016 at 22:35

You must log in to answer this question.

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