mounting a remote sftp (ssh) storage

Status
Not open for further replies.

Sander Jansen

Explorer
Joined
Dec 26, 2015
Messages
87
hey, im looking for a way to mount a sftp share from a friend of mine... I know i can mount local shares of smb and so on but i have no idea how to/ or if its possible to mount sftp remote shares...

I found this for mounting smb... and some posts say i can also use it for mounting ssh/sftp but i havent got it working...
mount -t smbfs //nmachine/partage /mnt/repertoire

if its possible, can someone help me ?
 
Joined
Jan 9, 2015
Messages
430
Long term solution: VPN between locations.
Quick and dirty: Linux virtual machine with sshfs installed.
 

Sander Jansen

Explorer
Joined
Dec 26, 2015
Messages
87
hmm... vpn would be the easiest solution because we already have that running... but how would that work? because its not really a option that one of the two locations only works via vpn... as in with the local use such as shares... if it could be done with lets say... a virtual NIC that would be great...

i have no idea (yet) how to connect with vpn from the freenas... havent looked it up yet... and after that, im guessing i can just mount the smb share... so im guessing that isnt to hard to do... just have to work out how to logon automaticly (insame long random carecter pasword so possibly not optimised for commandline)... possibly making the same user on both sides? in the end the plan is to have a Rsync running between my FreeNAS and his Synology so if there is a better way to do it than to mount it... that would be welcome aswell... but it would need to run on eighter ssh or sftp... (vpn is a option as long as it doesnt slow down local preformance)

I know its possible to use Rsync over SSH and this would have my choice...but ive never gotten it to work... i didnt even got past the ssh key thingy (on freenas)... it just kept asking for it... and i havent found a guide witch works with a sonology on the other side... I followed this one for that: https://doc.freenas.org/9.3/freenas_tasks.html#rsync-over-ssh-mode but didnt have much luck...

ps. its late now so ill look into the vpn tomorrow.
 
Last edited:

Sander Jansen

Explorer
Joined
Dec 26, 2015
Messages
87
im trying something else now... what i was trying to do in the first place... i wanted to use rsync over ssh... and i started to mess around with the command a bit... and this should be possible...
what i have so far is something like this:

rsync -avsz --stats --progress --size-only 'ssh -p 1555' user1@x.x.x.x:/remote/path /local/path
and for the other way around?:
rsync -avsz --stats --progress --size-only 'ssh -p 1555' /local/path user1@x.x.x.x:/remote/path

thing is, the data needs to be synced both ways... so its going to be 2 jobs per folder... no problems there i hope... but what worryes me the most is that i have to specify a password somewhere along the command because im not willing to remember to do this every day and wait for it to complete and start the next one...(doing the job manually)... so if someone can tell me if its possible to add a password to the command, that would be great... i did try to work with the ssl keys but it was a nightmare...
 
Last edited:
Status
Not open for further replies.
Top