SCP (Secure Copy) is a secure protocol based on SSH used for transferring files between computers.

learn more… | top users | synonyms

1
vote
1answer
3k views

How to copy files and directories to a remote host without rewrite a directory, just creating new ones

I tried to use scp to that task but unfortunately doesn't work, maybe i have a wrong idea if scp can do that Anyone can bring me some light? I read about rsync but i can't understand if rsync can just ...
1
vote
0answers
443 views

Inconsistencies with SCP for Ubuntu and Windows Server 2003 (using CygWin 1.7.x.x)

Some days ago I was able to scp to the remote server from my windows server 2003 using cygwin to copy the id_rsa, using scp (id_rsa.pub location) user@example.com now it(scp) seems to be not working. ...
3
votes
2answers
3k views

Copy a whole folder from a remote computer

I need to copy a whole folder from a remote computer. I am new to SSH and SCP. How can I do that?
-4
votes
3answers
211 views

Why must I add a colon for scp to work?

This command does nothing. scp doc.txt user@mywebsite.com This command, however, copies doc.txt into the home directory of my website. scp doc.txt user@mywebsite.com: Why doesn't the first ...
0
votes
1answer
62 views

runaway ram and external mouse sluggishness when doing scp

On my macbook air I noticed a weird problem, I wonder if this is normal. I was copying 4gb file from my mac to home server using scp. First I noticed my usb/wireless mouse getting sluggish I checked ...
0
votes
2answers
466 views

sftp packet length error with loaded .bashrc

I regularly use WinSCP to tranfer a few files to my personal server. However I recently experienced the infamous "bad packet length" error due to one of my echo statements residing inside the .bashrc ...
0
votes
1answer
5k views

ssh successful but not scp? why?

I am trying to automate the file transfer between server and the local machine, which I was able to do it on laptop running windows 7 as well as Ubuntu. Now trying to implement it on the local desktop ...
1
vote
1answer
1k views

Putty SCP known_hosts file or StrictHostKeyChecking=no

I need to be able to use a .known_hosts file or just disable checking, preferably the first option. I would be open to other ideas/software too, but hopefully someone can tell me how to do this with ...
1
vote
0answers
307 views

lftp mget equivalent for put?

Reading this answer, it seems an awesome way of transferring a ton of tiny files between two remote machines is lftp's mget command. However, I'm using two machines without root access, and only the ...
1
vote
1answer
804 views

Why doesn't redirect work for scp password input?

I want to copy from remote box with scp, while the fact that each time I have to re-enter password is annoying. So I store my password in plain text and expect the following code should work scp ...
1
vote
2answers
1k views

Windows: How to securely transfer file from windows machine to remote host

I am currently looking at have a scheduled task set-up that will transfer a file from a Windows system to a remote host (possibly another Windows or Linux). In linux I know this can easily be done ...
3
votes
3answers
3k views

Coda 2 and SCP uploading files with the wrong permission

Currently I have a basic Ubuntu server running a website. The website is for a few students learning HTML/PHP and each student has their own account with a symbolic link to the shared website folder. ...
1
vote
1answer
207 views

Formatting pwd/ls for use with scp

I have two terminal windows with bash. One is local on the client computer, another one has an SSH-session on the server. On the server, I am in a directory and seeing a file I would like to copy to ...
0
votes
1answer
4k views

An attempt to scp a file I can read returns the error, “No such file or directory”

I'm trying to scp (secure copy) a file from a remote server to my local machine. The command I am using is this: scp user@server:/path/to/source/file.gz /path/to/destination But the error I get is ...
-1
votes
1answer
2k views

SCP send Lost connection

scp file.txt user1@10.57.111.44:/W/ Each time when I issue this SCP command, I get Connection to 10.57.111.44 closed by remote host. lost connection. Why is this happening?? ...
0
votes
1answer
158 views

how to use scp command?

Is there any way of remembering how to use scp command? I tend to forget how to use it. Folder/file argument - order of arguments etc. Are there any tricks for remembering this, so that every-time i ...
0
votes
2answers
761 views

Compressing files from SCP on the fly

I am retrieving a large files using SCP (from a linux system to a Windows system), now is there any way of compressing that destination file on the fly, for example: pscp -C ...
1
vote
2answers
841 views

Can i scp to an sftp-only server with RHEL5?

I have a RHEL5 box with sftp access to a central server. No ssh, not anything else but sftp. SFTP is nice, but it's interactive. I've heard of scp variants that use sftp protocol under the hood, ...
0
votes
2answers
3k views

Overwrite if newer : SCP folder transfer

WinSCP has a great feature that only copies newer versions of files when you transfer between hosts. For whatever reason, I'm not able to connect to my remote host via WinSCP so I must use SSH. I ...
4
votes
4answers
2k views

Is there a way to resume an interrupted scp of a file?

I'm occasionally downloading a very large file via scp and there's a small chance each time of the connection dropping and cutting the transfer mid-way. Is there a way to resume it?
6
votes
3answers
6k views

How to gzip a directory, transfer via scp, and decompress in one command?

I frequently transfer large directories over scp and it would be sweet if I could somehow compress the directory, send it, and decompress it all in one. Is something like this possible?
1
vote
1answer
5k views

How can I copy a file from the machine I'm ssh'd into? [duplicate]

I use my own laptop running Ubuntu to ssh to my school server (which is running another Linux distribution). I do my assignments remotely like this, but I have an habit of putting all my files on ...
12
votes
1answer
10k views

Using SCP or SFTP with my ssh config file?

Perhaps my google-foo is failing me here... I'd like to connect and upload a mysql dump file via terminal using SFTP or SCP to my remote server using my ssh config file. According to documentation ...
6
votes
3answers
4k views

scp with zsh : no matches found

when I try scp over zsh, I get scp hostA:Descargas/debian-6.0.4-* user@192.168.1.154:Escritorio/Software/ zsh: no matches found: hostA:Descargas/debian-6.0.4-* the same command work in bash
8
votes
2answers
5k views

How to copy a sparse file using scp?

Do we have any option in scp that I could copy a sparse file ? The following command works with ssh, But I am looking for an option in SCP which copies a sparse file. tar -Szcf - /home/myself/test/ ...
0
votes
1answer
232 views

single persistent scp connection program options

I'm using PSCP (part of the putty package) to make several connections to a server but my boss would like to reduce the number of connections to 1. Is there a Windows program like PSCP which only ...
3
votes
2answers
2k views

scp remoteA:file remoteB:

with scp I can get a file scp remoteA:file . and put a file scp file remoteB: but when I try scp remoteA:file remoteB: I get ssh: Could not resolve hostname remoteB: Name or service ...
6
votes
2answers
24k views

How to SCP from linux server to Windows client

I am Puttying into a linux machine and trying to copy a file down somewhere (anywhere) to my local machine. I figure SCP is the best candidate for the job but don't really care, so long as the ...
1
vote
1answer
1k views

I get “lost connection” error while using ssh and scp

mySCP="scp -q -o StrictHostKeyChecking=no -o BatchMode=yes -o UserKnownHostsFile=/dev/null -o HostbasedAuthentication=no" rm -Rf /tmp/logdata mkdir /tmp/logdata $mySCP -r ...
0
votes
1answer
188 views

Use different shell for scp

I want to use a different shell when Im scping files to a remote server as compared to when Im logging in. Is there a way to do this? Note that both scp/remote login is done with the same user, so I ...
1
vote
1answer
473 views

Copying a large number of small text files between two servers over WAN

We have a few thousand small files (2-20KB) to copy between servers in one folder for backup purposes. Currently the process is automated as a cron job and does of SCP copy of each file to the remote ...
13
votes
1answer
35k views

scp'ing using key file as a parameter, How can I do that if possible?

scp -i ~/.ssh/id_rsa.pub events*$date*_QA.log $remote_user@$remote_server:$remote_location Is the aforementioned script incorrect? Am I not doing it correctly? I went to .ssh directory and see that ...
0
votes
1answer
434 views

scp permission error

I am trying to do a scp from a server where the user home directory has been given permission 744 recursively. On doing scp I am getting the following error "C0744 1733 database.cpp" . The situation ...
5
votes
3answers
16k views

scp doesn't work but ssh does

If I want to send something via scp to server: $ scp file server: _____ _____ _____ $ , then three lines are printed and file is not copied. However I can connect to server via ...
3
votes
1answer
6k views

Difference between scp and rsync?

Title pretty much says it all. If I have a folder (mydir/) on server1.com, and want to copy it to a parent folder on server2.com, then what is the difference (performance, security, capabilities, ...
2
votes
2answers
627 views

why use ftp when scp is available?

Many webhosts etc want you to upload files using ftp or sftp. Yet I always found that scp is faster and simple works better (more like the local cp command). What are the advantages ftp has to offer ...
1
vote
1answer
7k views

Can SSH into remote server but can't SCP?

I can SSH into remote server just fine using private key authentication with prompt for passphrase. However I'm getting permission denied when I try to SCP a file using the same passphrase. Here's my ...
1
vote
1answer
604 views

How to use scp between servers

I have 2 Linux machines (CentOS), and I want to transfer a file from one of them to a directory on the other. A co-worker suggested using scp. I've looked at the official docs, and tried getting it to ...
1
vote
1answer
778 views

SSH download file from web server

I need to do a backup on a website, but I need to download locally to a folder on my hard drive. Example: scp name.zip -> MyMac/Documents/Backup This can be done via shell, Terminal, etc. What ...
0
votes
1answer
2k views

Sudo with scp - transfering local file to remote server using ssh

So I'm running the following command scp \desktop\myfolder\deployments\myfile.txt user@host:/path/to/whereyouwant/thefile In an attempt to transfer a file from my local windows 7 machine to a ...
1
vote
2answers
804 views

How to retrieve files to local machine when logged in to SSH?

I know that you can grab files with scp like this: scp user@remote_machine:/path/to/source /path/to/destination However, I'd like to know if there is an easier way to do this, when I'm already ...
0
votes
1answer
191 views

Ubuntu. I have disabled ssh login with root on my server, but how to copy files from local to server now?

I can log in to my server with user name "xyzuser" and then use su -l to get root access. But how do I transfer files? Any suggestions?
2
votes
3answers
914 views

How to evaluate environment remote variables in SCP?

Is there a way to have environment variables on a remote host evaluated when using SCP? For instance, let's say I have $FOO= /mydir on host A; how would I do something like: scp ...
1
vote
3answers
4k views

Copy files from remote Unix machine to windows

I have a remote Unix machine which doesnt have SMB installed and I cannot install it. However there are some files located on that server that I need on a windows machine. What I need is a way to ...
1
vote
1answer
260 views

.sh script is not executed as the user I want therefore scp does not work

I was using the GUI version of Transmission for Ubuntu. When my torrents were downloaded I ran the following script as user server with the corresponding ssh keys: #!/bin/bash cd ...
0
votes
1answer
731 views

Why do I get a different behavior of the scp command in csh and bash?

Why do I get a different behavior of the scp command in csh and bash? Same command is working in csh shell, but it not working in bash shell. Please can anybody help? bash-3.2$ csh Linux-007% ...
3
votes
1answer
630 views

Any way to restart copying of a large file from where it was interrupted

at work, I sshed to a remote server at another location of my company. I generally use scp to copy files from/to remote server from local Ubuntu machine i work on. Recently while I was copying a file ...
0
votes
0answers
438 views

scp fails randomly

I'm trying to set up a regular scp between two linux based systems (one with SLC5, other running Ubuntu). I seem to be able to happily copy in one direction, but not the other. Copying from the ...
6
votes
2answers
719 views

SCP recursive file transfer order

Wondering whether it's possible to specify a sort order when transferring files with scp. For example: $ scp -r "user@host:/path/to/download/" . [... files download in a seemingly random order ...] ...
0
votes
1answer
2k views

Copying a folder from one server to another using scp

I am using PuTTY. I am trying to copy a folder from one server to another server in Linux. But I am getting this error on to the PuTTY console as myfolder: Not a regular file Is it possible to ...