How to define where files are moved to making use of ssh

I recognize just how I can send files to a details directory site on a remote web server making use of ssh, yet I do not recognize just how to define it.

0
2019-05-18 22:45:32
Source Share
Answers: 2

There are a couple of approaches.

The most basic means if you are simply moving a documents occasionally.

scp myfile.txt [email protected]:/home/user/

scp represents safe and secure duplicate and also it moves over SSH.
There is additionally sftp

sftp [email protected]
> cd /home/user/
> put myfile.txt

I presume the only actual benefit to utilizing this is that you can move numerous files without keying in your SSH password regularly. (If you do not make use of a keyring that is)

If you are mosting likely to be consistently moving files have a look at rsync. A straightforward use of rsync could resemble:

rsync mydir/ [email protected]:/home/user/

But have a look at the male web page as there are lots of alternatives.

Ultimately, there is a sshfs. With this method you can place an SSH web server to your neighborhood filesystem like any kind of various other filesystem, after that you can simply replicate files right into it.

sshfs [email protected]:/home/user/ /mnt/ssh/
cp myfile.txt /mnt/ssh/
0
2019-05-21 07:59:28
Source

Technically, the response to your inquiry is that you have to define where the documents is. There is no magic.

As an example with SCP (which makes use of the SSH method) you would certainly define username @systemname: pathtofile

SCP after that visit to the system that you define making use of the username and also adheres to the course that you define to locate the documents.

0
2019-05-21 07:39:49
Source