SSHFS with tsh. Is it possible?

Hi, is there any chance of using tsh with sshfs? I got connection refused but i’m not sure if it’s a matter of server ssh config or a tsh limitation

It should work fine - what kind of error are you seeing in teleport?

After successful tsh login, then I execute

$ sshfs -o ssh_command="tsh --proxy access.host.io:4080 ssh --cluster mia.project.com" rmier@dev-01.project.com:/home/rmier/test_sshfs /home/rme/test_sshfs
remote host has disconnected

I’m not sure this will work. I think the main issue is that Teleport doesn’t support the sftp subsystem which sshfs relies on.

WARN [NODE]      Failed to parse subsystem request: &{subsystem true [0 0 0 4 115 102 116 112] 0xc000e25440 <nil>}: unrecognized subsystem: sftp. id:101 local:127.0.0.1:3022 login:root remote:1.2.3.4:33564 teleportUser:gus@gravitational.com regular/sshserver.go:1217
ERRO [NODE]      unrecognized subsystem: sftp regular/sshserver.go:1405
DEBU [SSH:PROXY] Closed connection 1.2.3.4:33564. sshutils/server.go:427

Out of interest, what version of Teleport are you running?

I’ve looked into this a bit more. Teleport’s node service doesn’t support the sftp subsystem, so a node which is only running Teleport won’t be able to make use of sshfs.

If you’re using Teleport as a bastion/proxy to access a system running sshd, however, it will pass any subsystem requests direct to the host and sshd is able to support the use of sshfs. This may be a way to work around the restriction.