To mount a network drive as a local one, you can use sshfs.

Generate SSH key

1$ mkdir ~/.ssh #if it does not already exist
2$ chmod 700 ~/.ssh
3$ cd ~/.ssh
4$ ssh-keygen -t rsa
5$ enter a keyname
6$ enter a passphrase
7$ ssh-copy-id -i [path to rsa file] USER@SERVER

Where -i indicates where the rsa file is located. The .pub key is the one needed to be copied.

[Optional] Start a SSH agent, and add the key to the SSH agent:

1$ eval `ssh-agent -s` # if needed
2$ ssh-add ~/.ssh/KEY.pub

Install sshfs

For Ubuntu:

1sudo apt install sshfs

For Mac: Download both FUSE and SSHFS from here

Create a mounting point

1# Ubuntu
2sudo mkdir /mnt/foo
3
4# Mac
5sudo mkdir /Volumes/foo

Connect to the remove server

1# Ubuntu
2sudo sshfs USER@SERVER:/ /mnt/foo/ -o allow_other,IdentityFile=/home/USER/.ssh/SERVER_rsa
3
4# Mac
5sudo sshfs USER@SERVER:/ /Volumes/foo/ -o allow_other,IdentityFile=/home/USER/.ssh/SERVER_rsa,defer_permissions

Disconnect from the remove server

1# Ubuntu
2sudo umount /mnt/foo
3
4# Mac
5sudo umount /Volumes/foo