Tagged Questions

Secure Copy or SCP is a means of securely transferring computer files between a local and a remote host or between two remote hosts.

learn more… | top users | synonyms

2
votes
1answer
202 views

scp refuses to do anything but print usage

I'm trying to copy a file on my home network using scp. However, every time I run it, it just prints usage instructions. $ scp alex@192.168.0.4:ipdetect-0.6.tar.bz2 usage: scp [-12346BCpqrv] [-c ...
3
votes
1answer
180 views

Copy symlinks from ext3 to cifs share

I'm using scp to copy files from a Linux disk (ext3 file format) to a Windows disk (NTFS exposed using CIFS over the network). I've found that scp follows symbolic links and copies their contents ...
1
vote
2answers
3k views

How can I scp a file that my user can't read but I can sudo?

Can I use scp to copy a file from a remote server which my login user can't read, but where I have permission to sudo to root (without password even)? How?
2
votes
2answers
565 views

scp to /home changes permissions?

This would be illustrated very nicely with an scheme. When I write "Test: OK" or "Test: FAIL" I am restarting apache server (httpd service). Basically, performing everything as root in the ...
2
votes
1answer
217 views

ssh/scp works but rsync just constantly says “no”

Hi I have a windows 2003 server that I need to back up onto a linux client so I install cygwin on the Win2k3. On the Win2k3 I have enabled ssh, scp but (because the Win2k3 server uses an customised ...
0
votes
1answer
134 views

Indirect SCP connection

I use ssh and scp to connect to a remote server. Due to a ip/proxy limitation on the remote server, I have to connect first to another server. For example, if I want to connect to "SERVER-A", I have ...
2
votes
2answers
4k views

How to scp/tar files that are in between specific days?

I need to copy db log files between two suse servers where I am interested in files ONLY in between 10.3.2013 - 13.3.2013 It is desired to compress the files before copying so I tar them and scp. ...
0
votes
2answers
607 views

scp hangs on SSH2_MSG_SERVICE_ACCEPT received

I frequently scp my file to remote host. But suddenly it started taking more than 30 seconds to copy 20kb file.It used to take not more than half a second. After referring to some blog I appended ...
1
vote
1answer
409 views

scp recursively directories on SunOS

I have encountered a small issue with SCP (and also rsync). I need to copy certain files from server A (running SunOS 5.8) to server B (running SunOS 5.10). First, I get the list of files (several ...
10
votes
1answer
10k views

scp and compress at the same time, no intermediate save

What is the canonical way to: scp a file to a remote location compress the file in transit (tar or not, single file or whole folder, 7za or something else even more efficient) do the above without ...
2
votes
1answer
912 views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
2
votes
3answers
3k views

How to scp with regular expressions

I'm trying to copy all files that do not begin with the letter "a", in ksh. Copying from the source machine to destination machine is working fine: scp -p !(a*) user@machine:/path/directory/. But, ...
2
votes
5answers
4k views

Changing user while scp

I need to copy file between Linux machines. The problem that the user I use to login (myuser), is different from the user that can access the file. If I just ssh to the machine, I can switch the user ...
11
votes
5answers
4k views

Does a `scp` transfer close when I close the shell?

I have scp transfer (from one remote server to another), that is quite big. So maybe I want close the computer from which I executed this command, will this end the transfer? I have ssh access to ...
1
vote
4answers
1k views

How to copy Big files on other Linux Server Independent of TTY

Actually i was trying to copy all the files in another director. Total size of the file is 188GB so its going to take a time. Im trying to copy for Linux server A to B using this command nohup scp ...
0
votes
1answer
283 views

scp current folder to destination folder name as ddmmyy

I want to add a cron job that scp a folder to a server with on the server the folder name is in another folder whose folder name is a timestamp like ddmmyy something like scp -r <foldername> ...
5
votes
3answers
692 views

Tar piped to split piped to scp

So I'm trying to transfer a bunch of files via SCP. Some of these are too large to be stored on the recipient (Android phone, 4GB file size limit). The sender is almost out of space, so I can't ...
2
votes
3answers
5k views

scp force overwrite read only files

I was wanting to use scp to move some files and overwrite any existing instances of these files on the destination server. Some of them may be read only which, of course, courses the scp to fail with ...
0
votes
1answer
140 views

I'm only allowing pubkey auth via ssh. How can I still log in with password?

vi /etc/ssh/sshd_config egrep -i 'Pubkey|Password|Listen' /etc/ssh/sshd_config | grep -v '^#' ListenAddress 0.0.0.0 PermitRootLogin without-password PubkeyAuthentication yes ...
2
votes
2answers
383 views

Transfer a file from Android to a PC (not in the same network)

If I were connected by wifi in my network, there isn't any problem because with AirDroid I can access the sdcard files using the browser. However when I am out, how can I transfer a file from my ...
2
votes
3answers
2k views

Suppress server message in rsync

When I rsync or scp from a particular server I get a rather long message telling me the rules of the server. However when I setup regular pulls, I'd like to be able to suppress those messages in my ...
5
votes
2answers
2k views

Scp doesn't work in cron

Yeah, I know it's classic. I've googled it all around, but still it doesn't work. I have the following script: #First go to SVN repo folder cd $svnrepos # Just make sure we have write access to ...
2
votes
2answers
725 views

I can ssh into a remote machine but I can't use scp to copy local stuff to the remote machine

I'm using a remote machine, which is in a lab and the administrator ask a RSA public key and then I can login into that machine using a passphrase I set now I want to use scp to copy local stuff to ...
3
votes
1answer
175 views

Escaping quotes for scp

I needed to write a that behaves correctly with nasty (spaces, braces, etc..) filenames. scp -rv "$1" shiny:/Volumes/Seagate3To/\"$1\" This function works, but I don't understand why the quotes ...
1
vote
2answers
203 views

How to scp folders with nasty names using a shell function

I am trying to write a function that I will put on all my machines in order to make it easy to send files at a fixed place on my network. Here is my script so far. Some folder may have duplicates ...
2
votes
2answers
4k views

Recursive scp without following links or creating a giant tar file?

So I did a recursive scp on my remote fileserver (in another state) and it created an infinite loop of links on my remote web directory... ...
4
votes
3answers
6k views

Copy over ssh and execute commands in one session [duplicate]

Possible Duplicate: Using an already established SSH channel Here is my sync script: ssh user@remote.host /etc/init.d/some_service stop scp user@remote.host:/var/some_service/events ...
1
vote
1answer
1k views

SCP and/or SSH command with password in line

First, I'm TRYING to use rsa keys because I'm using the script to create RSA keys, but initially I have to connect to the remote machine to pass over the newly generated authentication key. Having ...
11
votes
4answers
43k views

Error using SCP: “not a regular file”

I have been searching for a while and I can't find the definition of a regular file. My path is permanent (I start at /) and I am connecting to scp root@IP: /path/to/picture.jpg Results in an ...
4
votes
1answer
1k views

scp permission denied after 'hardening' with bastille

I recently 'hardened' two Ubuntu servers using Bastille, and now I get permission denied: scp whenever I try to scp files in. SSH login works fine. I've tried adding an /scp-dump folder with 777 ...
3
votes
1answer
325 views

Configure SCP access for login without a local account

Can I set up accounts that can do SCP that are NOT local users (i.e. users with an entry in /etc/passwd)? I've tried googling for SCP "without PAM authentication" or alternative authenication for sshd ...
4
votes
2answers
4k views

How can I send single file to multiple remote sites at the same time?

Can scp be used to send a single file to multiple remote servers at the same time? If so, how? If not, what's the alternative?
2
votes
5answers
21k views

Transfer files using scp: permission denied

I try to transfer files from remote computer using ssh to my computer : scp My_file.txt user_id@server:/Home This should put My_file.txt in the home folder on my own computer, right? I get ...
3
votes
2answers
500 views

How to enable local ~ autocompletion for scp?

Too late: The machine, OS and configuration in question is no longer in use, so I can't verify any more suggestions. I have not encountered this problem in Fedora or Arch Linux. If you are having this ...
2
votes
2answers
236 views

Interesting Secure Copy Behavior

I'm not entirely sure where to ask this question, so if this is not the right place just let me know and I'll move it. Today I was trying to using recursive scp to copy a directory between two Linux ...
3
votes
2answers
1k views

Short way to scp using the same dir/file in origin and target

I am frequently updating files from a development enviroment to a production one in different servers so the paths are the same in both hosts and it becomes kind of a repetitive procedure to update a ...
4
votes
3answers
4k views

Execute remote script with local parameter value

How can I automatize this task? 1) You are at A. 2) You ssh into B. 3) You run a script at B, that needs a parameter known at A. First, I thought perhaps I could send the value when I opened the ...
6
votes
3answers
534 views

Send an email any time an SSH key is used

I have about 30 nearly-identical CentOS 6 servers that I need to be able to push out updated config files automatically using an rsa key to log in as root. Usually this will just be rsync, but ...
16
votes
4answers
16k views

Is there ever a reason to use scp instead of rsync?

Is there a reason to use scp instead of rsync? I can see no reason for using scp ever again, rsync does everything that scp does, with more safety (can preserve symlinks etc).
4
votes
1answer
21k views

How do I use sftp to get a directory and all its contents? [duplicate]

When I try to use the command get from sftp, I get the error saying that it is not a normal file. Is there a way around this?
4
votes
2answers
4k views

Disable direct login for normal users (like oracle) in linux but allow scp and sftp?

Is it possible to disable direct login for normal users (like oracle) in linux but allow scp and sftp for that use?
9
votes
4answers
14k views

How to copy with SCP between two servers using key auth?

I can log in via SSH using key authentication to SERVER1 and SERVER2. However, I can't copy files between the two servers. Why? How can I copy between them? (the data that I have to copy is bigger ...
1
vote
1answer
2k views

Why is this scp command creating a directory one level up?

I am trying to copy a file from one machine to another machine via ssh. Both machines are Ubuntu servers. Both machines have exchaged keys so that they can log into each other without passwords. The ...
4
votes
3answers
2k views

scp: localhost password not accepted

I'm attempting to copy a public key to a remote server. I'm logged in locally as [localname] and the key resides locally at ~/.ssh/. I'm also ssh'd into [remote.com] as [remotename], and attempting to ...
2
votes
0answers
174 views

Vim - Cursorline turns on after saving a remote file

Using vim scp://.... I open a remote file. cursorline is not shown until I save the file(:w). When I type :w and enter password, cursorline appears.If I type :set nocursorline it disappears but again ...
3
votes
3answers
445 views

Where did scp put these files?

I ran an scp command to download some files from an SSH server. Instead of using the . to put it in the current folder, I accidentally typed *. It looks like scp copied the files and put them ...
6
votes
2answers
2k views

Problem in secure copying (scp) filenames with spaces

I am trying to copy files using secure copy(scp). I am trying to execute the following command but I get error due to the space in the absolute path of the location of the directory. scp -r -P 8484 ...
1
vote
1answer
1k views

Unable to use scp on Solaris

I'm trying to use scp from one Solaris machine to another, but I get this message and the copy fails: root@ark123 # scp -r emcgrab_SunOS_v4.4.4a.tar 192.163.119.21:/tmp Password: Sourcing ...
5
votes
3answers
412 views

Copying large tree from one machine to another, maintaining ownership

I am trying to copy a large folder structure between machines. I want to maintain the ownership/rights during the copy as it is not reasonable to 'fix' the privs afterwards. Therefore, I am using the ...
7
votes
2answers
206 views

Is it possible to make scp fail when you do a local copy?

Is it possible to make scp fail when you do a local copy? I find it annoying to accidently create files with names like 192.168.11.5 when I meant to type 192.168.11.5: and hence copying the file to ...