Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create directory as an ssh link

Tags:

linux

scp

ssh

I'd like to create a directory that links to external site via ssh. So that when I cd to /var/remote/dev01 it will actually cd to a folder on a remote site. So I'm staying on my current terminal and can copy files from any other dir to this /var/remote/dev01 dir and it will copy the files over to the remote host. Is this even doable?

like image 458
Randall Stevens Avatar asked Jan 16 '23 14:01

Randall Stevens


1 Answers

Yes, this is possible. Take a look at SSHFS. It lets you mount a remote filesystem over ssh, and treat it as a local mountpoint, for standard filesystem operations.

Here's a nice walkthrough to get you started.

like image 140
ire_and_curses Avatar answered Jan 25 '23 19:01

ire_and_curses