Hot answers tagged scp
In the past, the way in which scp worked, when called (naively) to copy files between remote systems, was very inconvenient: if you wrote, for instance scp user1@remote1:/home/user1/file1.txt user2@remote2:/home/user2/file1.txt scp would first open an ssh session on remote1, and then it would run scp from there to remote2. For this to work, you would ...
From Wikipedia: Compared to the earlier SCP protocol, which allows only file transfers, the SFTP protocol allows for a range of operations on remote files – it is more like a remote file system protocol. An SFTP client's extra capabilities compared to an SCP client include resuming interrupted transfers, directory listings, and remote ...
In a nutshell, scp can only be used for transferring files, and it is non-interactive (i.e., everything has to be specified on the command line). sftp is more elaborate, and allows interactive commands to do things like creating directories, deleting directories and files (all subject to system permissions, of course), etc.
The way the question is asked is pretty confusing, but if you can copy from your local machine to the server, to go the other way just flip the command line order. its scp [from] [to] scp user@homeip:/path/to/file /local/path/
To send a file: cat file | ssh ajw@dogmatix "cat > remote" Or: ssh ajw@dogmatix "cat > remote" < file To receive a file: ssh ajw@dogmatix "cat remote" > copy
Rsync will obviously be faster than scp if the target already contains some of the source files, since rsync only copies the differences. But I suspect your question was about doing a straightforward copy to an empty target. You've passed the -z option to rsync; this turns on compression. If the network bandwidth is the limiting factor (it often is), ...
You can pipe into ssh and run a remote command. In this case, the remote command is cat > big.txt which will copy stdin into the big.txt file. echo "Lots of data" | ssh firstname.lastname@example.org 'cat > big.txt' It's easy and straightforward, as long as you can use ssh to connect to the remote end. You can also use nc (NetCat) to transfer the data. On the ...
Something like this should work well: tar c some/dir | gzip - | ssh host2 tar xz Maybe also omit gzip and the "z" flag for extraction, since you are on a gigabit network.
First, you need to copy the file to a place where you have write access without sudo, scp yourfile serverb: Then move the file using sudo ssh serverb sudo mv yourfile /path/to/the/destination If you do not have a writable place, make a temporary dir with write permission for your user. ssh serverb sudo mkdir tempdir && sudo chmod 777 tempdir ...
You can also use inotifywait from the inotify-tools package. inotifywait -r -m -e close_write --format '%w%f' /tmp | while read MODFILE do echo need to rsync $MODFILE ... done
I know this is a late answer, but I just found out a cool way to do this. It is basically Holger Just's answer, but in a saved config file: You need to put this in your ~/.ssh/config file on local.machine, (creating the file if it does not exist) Host target.machine User targetuser HostName target.machine ProxyCommand ssh ...
Copy the file "foobar.txt" from a remote host to the local host $ scp email@example.com:foobar.txt /some/local/directory Copy the file "foobar.txt" from the local host to a remote host $ scp foobar.txt firstname.lastname@example.org:/some/remote/directory Copy the directory "foo" from the local host to a remote host's directory "bar" $ scp -r ...
-i identity_file Selects the file from which the identity (private key) for public key authentication is read. This option is directly passed to ssh(1). Use ~/.ssh/id_rsa.
Pipes: A$ tar c thefile anotherfile | ssh B "ssh C \"cd destination && tar xv\"" (Sometimes tar cf - or tar cf /dev/stdout has to be used instead of tar c. Similar for the receiving end.) single-file: A$ cat < thefile | ssh B "ssh C \"cd destination && cat > thefile\"" Tunnel through B: A$ ssh -fN -L 4567:C:22 B (all TCP ...
FTPS is FTP using the SSL protocol for encryption. This is different from the SCP/SFTP family of protocols which use SSH as their transport tunnel. You will usually use the same client programs for scp and sftp (WinSCP for instance; SFTP is an upgraded version of SCP), whereas you usually use a web browser or web Download manager (like filezilla) for FTPS. ...
Use tar: tar cvzf - -T list_of_filenames | ssh hostname tar xzf -
Originally I recommended http://www.swish-sftp.org/. It adds an 'Other' Swish drive in which each folder is an SFTP connection however this can't be accessed in all applications such us Java based Eclipse IDE or Notepad++. An alternative that works is http://www.eldos.com/sftp-net-drive/ or even runing Apache WebDAV (over SSL) as windows can natively map ...
I don't think you can, but you could use rsync? Something like this: rsync -a --exclude=a/c myserver:/a .
Escape your wildcard : scp hostA:Descargas/debian-6.0.4-\*
How about using rsync instead with the -z option enabled for compression? rsync -az --progress source_dir/* remote_host:/destination_dir This also has the added benefit that if the file already exists and has not changed on the destination, it will not be transferred.
One possible cause of this type of behavior is having any message print out during the login process on server. Scp depends on ssh to provide a totally transparent encrypted tunnel between the client and the server. Check all of the login scripts on the server, and also try using a different user. Another method of identifying the source of the error is ...
The scp option -3 ought to be what you are looking for. To put it in your example: scp -3 root@firstcomputer:./file root@secondcomputer:./ Note that the -3 option was first introduced in OpenSSH 5.7, which was released early 2011.
System Preferences pane → Sharing applet → check the Remote Login checkbox. This will enable SSH, and in turn, SCP.
From the help text: "... [-F ssh_config] ..." According to the above, -F expects one argument: path to an OpenSSH configuration file, ~/.ssh/config or similar. But you are giving it a gzipped SQL dump instead. Since plain ssh myalias is already working, you don't even need the -F option here. Just sftp myalias would connect to the server. However, the ...
You can use ssh and tar to work around this: ssh -t host 'sudo -v' ssh -C host 'cd /; sudo tar cf - path/to/file/or/dir' | tar xpsf - --preserve This first updates your sudo timestamp (asking for a password if necessary, which requires a tty (ssh -t)), and then uses sudo to create a tarball remotely and extract it locally. "tar" on RedHat 5 requires the ...
I'm sure the fact that you have all FIVE MILLION files in a single directory will throw many tools into a tizzy. I'm not surprised that rsync didn't handle this gracefully - it's quite a "unique" situation. If you could figure out a way to structure the files into some sort of directory structure, I'm sure the standard sync tools such as rsync would be ...
Since you're trying to use scp I assume there is a an SSH server running on the remote machine. You can directly connect to ssh servers using Nautilus file manager. Just use something like ssh://username@server:/path/on/remote/machine in the address bar. Furthermore, if an SSH server is running you could also use the SFTP protocol for remote file ...
You can do it in one command, but you need netcat (nc) installed on the proxy machine: ssh -o "ProxyCommand ssh email@example.com nc -w 1 %h 22" firstname.lastname@example.org [EDIT: mixed up the order of machines...]
ExpanDrive. As of 2008 I'm not aware of any solution that supports SCP, but there is a nasty horrible evil hack which should work (install Linux in a virtual machine, install sshfs, make a samba share, mount that on the host Windows machine). You're probably better off just using WinSCP. EDIT: there is now also https://www.eldos.com/sftp-net-drive/
If you're copying from a windows machine, you can use WinSCP to copy, and it has an option to set the permissions on the copied files after the upload. If not, I think your only choice is to execute a chmod on the server after the upload, which you could do remotely with an ssh command: scp /path/to/file server:/server/path/to/file ssh server chmod 644 ...
Only top voted, non community-wiki answers of a minimum length are eligible