Forrest logo
back to the sshfs tool

ssh:tldr:eada6

ssh: Mount remote directory from server with specific port.
$ sshfs ${username}@${remote_host}:${remote_directory} -p ${2222}
try on your machine

This command is used to mount a remote filesystem on your local system using SSH (Secure Shell) File System (SSHFS).

Here's a breakdown of the command:

  • sshfs: This is the command used to mount a remote filesystem using SSHFS.
  • ${username}: This is a variable that should be replaced with the username you use to connect to the remote host.
  • @: This symbol separates the username from the remote host.
  • ${remote_host}: This is a variable that should be replaced with the IP address or hostname of the remote host you want to connect to.
  • :: This symbol separates the remote host from the remote directory.
  • ${remote_directory}: This is a variable that should be replaced with the directory path on the remote host that you want to mount.
  • -p: This flag is used to specify the port number for the SSH connection.
  • ${2222}: This is a variable that should be replaced with the port number you want to use for the SSH connection.

To use this command, replace the variables ${username}, ${remote_host}, and ${remote_directory} with the appropriate values for your specific case. Additionally, if your SSH server does not use the default port 22, replace ${2222} with the correct port number.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the sshfs tool