I have some bridge host, which allows access to protected network. I connect to it using this command:
ssh sergius@bridge_host -D 3128
Thus, I can turn on socks proxy in browser and it works. I can login to hosts on that network with this command:
ssh -o 'ProxyCommand /bin/nc.openbsd -x localhost:3128 %h %p' sergius@any_internal_host
It works properly, but I can't mount via sshfs any of these hosts. Probably, I can't get how to use this ssh options in sshfs command. I tried even so silly tricks:
sshfs -o "ssh_command=\"ssh -o 'ProxyCommand /bin/nc.openbsd -x localhost:3128 %h %p'\"" sergius@$host /home/sergius/work/SSHFS/$host/
sshfs -o 'SSHOPT=ProxyCommand /bin/nc.openbsd -x localhost:3128 %h %p' sergius@$host: /home/sergius/work/SSHFS/$host/
sshfs -o 'port=3128' sergius@$host: /home/sergius/work/SSHFS/$host/
One command returns "Connection reset by peer", another - unknown option `SSHOPT=ProxyCommand /bin/nc.openbsd -x localhost:3128 %h %p'
I didn't manage to find any info on the web. Please, help.
===
I feel so stupid, but still can't understand why I got such error:
sshfs -d -o sshfs_debug -o LogLevel=DEBUG3 -o ProxyCommand="/bin/nc.openbsd --proxy localhost:3128 --proxy-type socks5 %h %p" sergius@$host:~ /home/sergius/work/SSHFS/$host/
SSHFS version 2.4
FUSE library version: 2.9.0
nullpath_ok: 0
nopath: 0
utime_omit_ok: 0
executing <ssh> <-x> <-a> <-oClearAllForwardings=yes> <-oLogLevel=DEBUG3> <-oProxyCommand=/bin/nc.openbsd --proxy localhost:3128 --proxy-type socks5 %h %p> <-2> <sergius@dev-host003> <-s> <sftp>
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Executing proxy command: exec /bin/nc.openbsd --proxy localhost:3128 --proxy-type socks5 dev-host003 22
debug1: permanently_drop_suid: 1000
debug1: identity file /home/sergius/.ssh/id_rsa type -1
debug1: identity file /home/sergius/.ssh/id_rsa-cert type -1
debug1: identity file /home/sergius/.ssh/id_dsa type -1
debug1: identity file /home/sergius/.ssh/id_dsa-cert type -1
debug1: identity file /home/sergius/.ssh/id_ecdsa type -1
debug1: identity file /home/sergius/.ssh/id_ecdsa-cert type -1
/bin/nc.openbsd: invalid option -- '-'
usage: nc [-46bCDdhjklnrStUuvZz] [-I length] [-i interval] [-O length]
[-P proxy_username] [-p source_port] [-q seconds] [-s source]
[-T toskeyword] [-V rtable] [-w timeout] [-X proxy_protocol]
[-x proxy_address[:port]] [destination] [port]
ssh_exchange_identification: Connection closed by remote host
read: Connection reset by peer
=================
Wow! I managed to make it work!!! Great thanks for clarification with options. I read all allowed options and make it via "-x proxy_adress[:port]":
sshfs -o ProxyCommand="/bin/nc.openbsd -x localhost:3128 %h %p" sergius@$host:/home/sergius /home/sergius/work/SSHFS/$host/