One-liners: Difference between revisions

Add ducks
Line 9: Line 9:


==Mount remote filesystem==
==Mount remote filesystem==
Using sshfs is a great tool for mounting remote filesystems so that you can use your local tools on them.  This example supplies a complex SSH command, including port-forwarding at the same time, to the SSHFS tool.
Using sshfs is a great tool for mounting remote filesystems so that you can use your local tools on them.  This example supplies a complex SSH command, including port-forwarding at the same time, to the [[SSHFS]] tool.
<source lang="bash">sshfs -o idmap=user -o ssh_command='ssh -t -i /home/greg/.ssh/eQualityTech-Test.pem -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/es1</source>
<source lang="bash">sshfs -o idmap=user -o ssh_command='ssh -t -i /home/greg/.ssh/eQualityTech-Test.pem -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/es1</source>