Montage SSHFS
Posted by mazet on 12 Nov 2009 in Systeme
Montage en direct
Shell
sshfs user@host:/directory mount_point |
Montage à travers une passerelle
Shell
sshfs -o ssh_command="tunnel.sh user_gateway@gateway" user@host:/directory mount_point |
Script de tunnelier tunnel.sh
(doit être accessible dans le PATH)
Code
#!/bin/sh | |
| |
if [ $# -lt 2 ]; then | |
echo "usage: sshfs -o ssh_command='tunnel.sh userA@hostA' userB@hostB" | |
exit 1 | |
fi | |
| |
relay=$1 | |
shift | |
| |
ssh -q $relay ssh -q $@ |
Démontage
Shell
fusermount -u mount_point |
This entry was posted by mazet and filed under Systeme.