Hier werden die Unterschiede zwischen zwei Versionen gezeigt.
tux:scp [2011/04/10 12:28] 127.0.0.1 external edit |
tux:scp [2011/07/28 11:21] (aktuell) wikisysop |
||
---|---|---|---|
Zeile 4: | Zeile 4: | ||
Wenn SSH auf Ziel- und Quellmaschine installiert ist, können über <fc #008000>scp</fc> ((http://unixhelp.ed.ac.uk/CGI/man-cgi?scp+1)) Dateien über das Terminal verschoben werden. Die Syntax hierzu wird an einigen Beispielen erklärt: | Wenn SSH auf Ziel- und Quellmaschine installiert ist, können über <fc #008000>scp</fc> ((http://unixhelp.ed.ac.uk/CGI/man-cgi?scp+1)) Dateien über das Terminal verschoben werden. Die Syntax hierzu wird an einigen Beispielen erklärt: | ||
- | Copy the file "foobar.txt" from a remote host directory to the local host: | + | Copy the file >><fc #008000>foobar.txt</fc><< from a remote host directory to the local host: |
- | <xterm2>$ <fc #008000>scp your_username@remotehost.edu:/some/remote/directory/foobar.txt /some/local/directory</fc></xterm2> | + | <xterm>$ <fc #008000>scp your_username@remotehost.edu:/some/remote/directory/foobar.txt /some/local/directory</fc></xterm> |
- | Copy the file "foobar.txt" from the local host to a remote host: | + | Copy the file >><fc #008000>foo bar.txt</fc><< from a remote host directory to the local host. Please note the space in the filename: |
- | <xterm2>$ <fc #008000>scp /path/to/local/directory/foobar.txt your_username@remotehost.edu:/some/remote/directory</fc></xterm2> | + | <xterm>$ <fc #008000>scp your_username@remotehost.edu:'/some/remote/directory/foo\ bar.txt' /some/local/directory</fc></xterm> |
- | Copy the directory "foo" from the local host to a remote host's directory "bar": | + | Copy the file >><fc #008000>foobar.txt</fc><< from the local host to a remote host: |
- | <xterm2>$ <fc #008000>scp -r foo your_username@remotehost.edu:/some/remote/directory/bar</fc></xterm2> | + | <xterm>$ <fc #008000>scp /path/to/local/directory/foobar.txt your_username@remotehost.edu:/some/remote/directory</fc></xterm> |
- | Copy the file "foobar.txt" from remote host "rh1.edu" to remote host "rh2.edu": | + | Copy the directory >><fc #008000>foo</fc><< from the local host to a remote host's directory >><fc #008000>bar</fc><<: |
- | <xterm2>$ <fc #008000>scp your_username@rh1.edu:/some/remote/directory/foobar.txt your_username@rh2.edu:/some/remote/directory/</fc></xterm2> | + | <xterm>$ <fc #008000>scp -r foo your_username@remotehost.edu:/some/remote/directory/bar</fc></xterm> |
- | Copy the files "foo.txt" and "bar.txt" from the local host to your home directory on the remote host: | + | Copy the file >><fc #008000>foobar.txt</fc><< from remote host >><fc #008000>rh1.edu</fc><< to remote host >><fc #008000>rh2.edu</fc><<: |
- | <xterm2>$ <fc #008000>scp foo.txt bar.txt your_username@remotehost.edu:~</fc> </xterm2> | + | <xterm>$ <fc #008000>scp your_username@rh1.edu:/some/remote/directory/foobar.txt your_username@rh2.edu:/some/remote/directory/</fc></xterm> |
+ | |||
+ | Copy the files >><fc #008000>foo.txt</fc><< and >><fc #008000>bar.txt</fc><< from the local host to your home directory on the remote host: | ||
+ | |||
+ | <xterm>$ <fc #008000>scp foo.txt bar.txt your_username@remotehost.edu:~</fc> </xterm> | ||
Copy multiple files from the remote host to your current directory on the local host: | Copy multiple files from the remote host to your current directory on the local host: | ||
- | <xterm2>$ <fc #008000>scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .</fc> </xterm2> | + | <xterm>$ <fc #008000>scp your_username@remotehost.edu:/some/remote/directory/\{a,b,c\} .</fc> </xterm> |
- | <xterm2>$ <fc #008000>scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .</fc> </xterm2> | + | <xterm>$ <fc #008000>scp your_username@remotehost.edu:~/\{foo.txt,bar.txt\} .</fc> </xterm> |
**scp Performance** | **scp Performance** | ||
Zeile 35: | Zeile 39: | ||
Der Default Encryption Algorythmus bei SSH ist Triple-DES. Bei Verwendung der Blowfish Encryption (<fc #008000>-c blowfish</fc>) kann die Performance uU gesteigert werden. Beide Stationen müssen dazu die Blowfish Encryption unterstützen. | Der Default Encryption Algorythmus bei SSH ist Triple-DES. Bei Verwendung der Blowfish Encryption (<fc #008000>-c blowfish</fc>) kann die Performance uU gesteigert werden. Beide Stationen müssen dazu die Blowfish Encryption unterstützen. | ||
- | Copy the file "foobar.txt" from localhost to remote users home directory by using the blowfish cypher: | + | Copy the file >><fc #008000>foobar.txt</fc><< from localhost to remote users home directory by using the blowfish cypher: |
- | <xterm2>$ <fc #008000>scp -c blowfish foobar.txt your_username@remotehost.edu:~</fc></xterm2> | + | <xterm>$ <fc #008000>scp -c blowfish foobar.txt your_username@remotehost.edu:~</fc></xterm> |
Ebenfalls kann es die Performance positiv beeinflussen, wenn man die Kompression (<fc #008000>- C</fc>) eingeschaltet. Diese Option kann den Durchsatz bei langsamen Verbindungen (WAN etc) erheblich steigern, bei schnellen Netzwerken (LAN etc) jedoch wird sich der Durchsatz nicht signifikant erhöhen. | Ebenfalls kann es die Performance positiv beeinflussen, wenn man die Kompression (<fc #008000>- C</fc>) eingeschaltet. Diese Option kann den Durchsatz bei langsamen Verbindungen (WAN etc) erheblich steigern, bei schnellen Netzwerken (LAN etc) jedoch wird sich der Durchsatz nicht signifikant erhöhen. | ||
- | Copy the file "foobar.txt" from localhost to remote users home directory by using the blowfish cypher and compressed data transfer: | + | Copy the file >><fc #008000>foobar.txt</fc><< from localhost to remote users home directory by using the blowfish cypher and compressed data transfer: |
- | <xterm2>$ <fc #008000>scp -c blowfish -C foobar.txt your_username@remotehost.edu:~</fc></xterm2> | + | <xterm>$ <fc #008000>scp -c blowfish -C foobar.txt your_username@remotehost.edu:~</fc></xterm> |
--- //pronto 2010/03/29 20:04// | --- //pronto 2010/03/29 20:04// | ||
{{keywords>linux unix osx syntax beispiele secure copy ssh}} | {{keywords>linux unix osx syntax beispiele secure copy ssh}} |