Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in AWS by (19.1k points)

I am trying to mount a folder on my amazon ec2 instance to my desktop folder using sshfs.

The problem is that I am not able to figure out how to give the option for a private key (awskey.pem).

Normally I ssh using

ssh [email protected]{amz-ip-address} -i {path to amzkey.pem}

But sshfs has no such options. However, I saw a -F option and tried

sshfs [email protected]{amz-ip-address}:{amz-folder}  {my mount dir} -F {path to amzkey.pem}

This gave me an error

"read: Connection reset by peer"

Please let me know if anyone has tried this before.

1 Answer

0 votes
by (44.3k points)

Use this:

-o IdentityFile=/home/user/.ssh/my_key

Instead of this:

-i .ssh/my_key

For more information, check out this documentation:

https://wiki.archlinux.org/index.php/SSHFS

Related questions

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...