View on GitHub


perform ssh mounts using passwords saved in .netrc

Download this project as a .zip file Download this project as a tar.gz file


PyPI version

A small Python script that mounts ssh mount points using authentication from your .netrc (or alternatively .authinfo) file.


You will need the sshfs package installed and in the PATH.

On Arch linux it is located in the Community repo. You can install it using:

pacman -S sshfs


python install


netrc configuration

Your netrc file should have a line matching the following pattern:

machine my_server_name    login my_login    password my_password


Its simplest form:

sshmount-netrc my_server_name

Specifying a custom mount point:

sshmount-netrc -m my_mount_point my_server_name

Specifying a custom netrc location:

sshmount-netrc -f ~/.authinfo my_server_name

default mount point

If no mountpoint is specified the following default will be used



Under the hood, this script will then execute the following linux commad:

echo my_password | sshfs -o password_stdin my_login@my_server_name: /my_mount_point


Currently you cannot have multiple logins on one machine. This is due to a long standing shortcoming in the Python netrc library. At the time of writing the bug describing it has not been resolved: