Open main menu

Changes

620 bytes added ,  10:56, 17 November 2017
better example of sshfs
<source lang="bash">
sudo sshfs -o IdentityFile=/home/greg/.ssh/id_rsa -o allow_other greg@eqt:/var/www/freephile.com/www/wikireport /mnt/droplet
</source>
Actually, that's a bad example. You shouldn't need sudo to sshfs. Create a mountpoint that you have write permission on. Then use the <code>-o idmap=user</code> option to translate your local user to the remote user (giving you the same permissions on the remote files as remote user would have).
<source lang="bash">
sudo mkdir /mnt/foo
sudo chown $USER:$USER /mnt/foo
sshfs -o idmap=user -o ssh_command='ssh -t -i /home/$USER/.ssh/id_rsa -o IdentitiesOnly=true -o ForwardAgent=true -L 127.0.0.1:43306:10.0.50.53:3306 centos@ec2-52-203-160-83.compute-1.amazonaws.com ssh -A' centos@10.0.50.161:/ /mnt/foo
</source>
4,558

edits