How to access Jetson nano files/directories remotely from ubuntu 18.04 host?

Dear all,

How to access Jetson nano directory remotely from ubuntu 18.04 host?
So I can copy files from/ to Jetson Nano to/ from ubuntu host easily.

I installed samba.

$ sudo smbpasswd -a suryadi

(at ubuntu host and jetson nano)

From my host ubuntu only can see print$
I tried to network share /opt (at Jetson Nano). Nautilus pop up:

Nautilus needs to add some permissions to your folder "opt" in order to share it.

The folder "opt" needs the following extra permissions for share to work:
- write permission by others
Do you want Nautilus to add these permissions to the folder automatically?

I click “Add the permissions automatically”

It gives: Could not change the permissions of folder "opt".

From my nano, I can not see any directory, it pop up:
Unable to access location. Failed to retrieve share list from server: Connection timed out.

Thank you very much in advance.

Warmest Regards,
Suryadi

Hi Suryadi, you can try using SSHFS to remotely mount the Nano’s filesystem from your PC:

# run these commands from your host PC
$ sudo apt-get install sshfs
$ sudo mkdir /mnt/jetson-nano
$ sudo sshfs -o allow_other <username>@<ip-address>:/opt /mnt/jetson-nano

Substitute your Nano’s username and IP address in the sshfs command above, and you should see the editable contents of Nano’s /opt directory from your host’s /mnt/jetson-nano directory. If you want to mount the entire contents of your Nano, remove ‘opt’ from the command above (:/opt -> :/)

To unmount the Nano before shutting down or when you have finished making changes, use the umount command from your host PC:

$ sudo umount /mnt/jetson-nano

Your Nano’s filesystem will then be unmounted from your host PC and you won’t see it’s contents under /mnt/jetson-nano anymore.

Dear Dusty,

It works!

Can /mnt/jetson-nano made permanently (I do not sudo umount /mnt/jetson-nano)?
Is it save to shutdown Jetson Nano without umount it first?

How to make the Nautilus on my ubuntu host can recognize /mnt/jetson-nano?
I try $ gnome-disks, also cannot recognize /mnt/jetson-nano.

Thank you very much in advance.

Warmest Regards,
Suryadi

It would seem that you need to use SSH keys for authentication for that, instead of manually entered password. See here for more info: https://askubuntu.com/a/710152

Personally, I just run a script after booting my host PC that mounts the Nano over SSHFS and enter the password then.

It is probably best practice to unmount first (especially if you are editing system files), so that any lingering changes are flushed/saved, but if you close any open files from your host PC before shutting down the Nano, it will probably be fine. In practice I haven’t encountered issues with it myself.

If you want a permanent connection, it’s probably better to use NFS than to use SSHFS.

Install NFS server on the Nano. Add the directory you want to export to /etc/exports. Then, on the desktop machine, add a NFS import to /etc/fstab, or use autofs.

$ sudo sshfs -o allow_other suryadi@192.168.55.1:/ /mnt/jetson-nano
read: Connection reset by peer

How to solve this problem?