I'm currently aware of SCP and SSH. There are times when I'm doing some work within a file that I need to download it locally to work on it. Which invokes:
-
Print the working Directory/Path
-
Get File name
-
Fire up new terminal window and do
scp myName@host:/Path/to/file/fileName.someExt ~/MyLocalPath
That works great, but it's a major pain in the ass. Is there an easy way to copy a file from a remote server over SSH without using the steps above?
Edit: I am looking for a way to transfer the files from the command line, while I am removed into the box. That way I can run commands and not just copy files.
Best Answer
You can use a FUSE application to mount remote files to the local filesystem. Then you can work on the files directly. When you change them, they will be changed on the remote end automatically.
First make sure you have the
fuse
kernel module loaded or built-in.Then you can use either sshfs, which is a standalone application:
Alternatively, you can use GVFS. If your're in a desktop, just type this into the file manager (or use
gvfs-mount
in command line):And the filesystem will be mounted to
If however you're not in a desktop, you'll have to start a D-Bus session before you can use
gvfs-mount
:You can automate the above by a shell script which you source (!).