2022/01/26

Mount sshfs on linux or windows

 Linux

    Install fuse and sshfs
        #sudo apt-get install fuse sshfs

    Mount
        usage: sshfs [user@]host:[dir] mountpoint [options]
        example:
            #sshfs aimwang@192.168.1.253:/home/aimwang /home/aimwang/nas1

    If you want to give the host direct access in WSL, you need to enable user_allow_other.

        Enable user_allow_other:
            Edit /etc/fuse.conf
            Uncomment user_allow_other

        Mount by your id
            Get user/group id number
                #id -u aimwang
                #id -g aimwang
        Mount with a specific user and group id
                #sshfs -o uid=1000,gid=1000,allow_other nas1:/home/aimwang /home/aimwang/nas1

Windows

    Install WinFsp, SSHFS-Win and SSHFS-Win-Manager.

    Execute SSHFS-Win-Manager
        

    
    Click [Add Connection]


    Fill the connection information.


    Click the connect button.
            



    You can see that it is mounted on the specified disk letter, when the connected.





沒有留言: