Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the signification of -f in scp command?

Tags:

java

scp

sshj

I'm using the library sshj for sending an scp command. It uses the option -f for downloading from a server to another. I can't find the -f option in the man.

What is the signification of -f in an scp command?

like image 767
Clepshydre Avatar asked Jul 21 '14 16:07

Clepshydre


1 Answers

-f and -t are undocumented switches which tell the remote scp to send or prepare to receive a file or files from the local scp.

This site explains it in slightly more detail in section 3.8.1. scp1 Details:

That copy is invoked with the undocumented switches -t and -f (for "to" and "from"), putting it into SCP1 server mode. This next table shows some examples; Figure 3-6 shows the details.

This client scp command:      Runs this remote command:
scp foo server:bar            scp -t bar
scp server:bar foo            scp -f bar
scp *.txt server:dir          scp -d -t dir
like image 127
Andrew Stubbs Avatar answered Oct 13 '22 21:10

Andrew Stubbs