I had originally asked this as a follow-up question here. Unfortunately, there haven't been any replies so I am posting it as its own question.
According to the documentation, you are supposed to be able to use ssh
options with sshfs
. How do you do this? I have tried something like -o User=joe
but then fuse gives me an error saying that "User" is not a recognized option.
Also, help with this question would also be appreciated.
Edit:
I am specifically referring to the following from the manpage for sshfs.
SSHFS options:
-p PORT equivalent to '-o port=PORT' -C equivalent to '-o compression=yes' ⋮ -o password_stdin read password from stdin (only for pam_mount!) -o SSHOPT=VAL ssh options (see man ssh_config)
I am trying to specify the remote username separate from the host (in other words, not user@host:dir
). The reason is that particular format is not friendly with some institutionally assigned usernames. For example, if the institution assigns the user name [email protected]
, programs such as sshfs and curlftpfs will not correctly interpret [email protected]@host:dir
. Instead, they will try to login as First.Last
to the host institution.edu@host
.
Could you explain a bit more about idmap
? I am not literate enough to understand what the manpage is saying.
Edit:
If I use idmap
, I am going to have to create hardcoded files. I was hoping to avoid that so that the user can just use a single command without needing to know how it works in the background. Eventually, other people might be using it even after I leave. Even so, the documentation says the file format is username:uid
. Which is the local and which is remote?
To pass SSH options to SSHFS, you can use
ssh_command
.For example, to pass
-c aes128-cbc
to SSH, use:TL/DR: For options requiring a path, use absolute paths.
This bit of sshfs' man page suggest that it should just work fine with
-o
:However, I had troubles passing in a certificate file with
-o CertificateFile=path/to/cert
. It turns out that it only works with an absolute path to the certificate file, while plainssh
happily accepts a relative path.There are a couple of options you can pass right away: -p PORT (to change the ssh port from the default 22) -C (to specify you want compression)