0

I am new to servers and getting confused I think. I have created a server using ubuntu server. I can now see the directories I want on my home machine which is running linux I have been trying different things to make it work but I think this is what made it work!

apt-get sshfs; 
mkdir ~/jehu;
sshfs phil@192.168.1.126:/home/phil /home/phil/jehu

once this is up and running I can then access the files on the server from Eg VLC using the file:///home/phil/jehu link

just getting confused...have I muddled up the commands? is this the best way to do this?

I have just started my server again, and I can't now access the files using file:///home/phil/jehu link what I want is something that will link this up on boot, not that I have to do manually

any help would be appreciated thanks

dykesy61

AEM
  • 1,166

1 Answers1

1

You can add information to /etc/fstab to make this work. But if you need to supply a password to make the remote connection then that is not an option. You can create a passwordless key to use for ssh, but that comes with security implications and I would not recommend it. Overally, I would suggest you look into a different protocol like NFS for LAN or DAV for a connection across the internet.

leggewie
  • 1,028
  • thanks - I have found some info about nfs sharing....once I have mounted the server directory on the client machine, how do I ensure it mounts each time ie that I don't have to do this again and again? Thanks – dykesy61 Apr 19 '20 at 10:42
  • Again, you make the entry in /etc/fstab. Have a look at "man fstab" and google for examples. There's plenty and many knobs to tweak (if you want). The link I already gave you answers both your initial and your follow-up question. – leggewie Apr 19 '20 at 11:11