Questions tagged [scp]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
359 views

SSH config: is there a way to distinguish between ssh and scp commands?

I manage SSH connections to remote machines using a special ProxyCommand in my ssh_config file. Suffice to say it's structured like this: Host my-target IdentityFile /path/to/temporary-key ...
25 votes
2 answers
49k views

scp + copy the symlinks

Why does the scp command not copy links from the local computer to the other? scp -rp dir linux:/dir_target How can I copy the links when in the source directory I have both files and links?
0 votes
0 answers
1k views

File transfer speed : SCP vs Copy-Paste over SSH

Recently, I've been transferring some files between a device on my local network and my computer, and I've noticed something. For a text file of approximately 2.5Mb Transfer using scp file.txt user@...
37 votes
4 answers
75k views

Allow incoming SCP connections on Mac

How can I allow incoming scp connections on my Mac (OS X 10.6.4) from other machines on the same network? Every time I’m trying to scp something on the machine I get a Connection refused error. ...
0 votes
1 answer
656 views

scp works with /bin/sh default shell, but disconnects with /bin/bash default shell [duplicate]

I've recently set up a fairly minimal Debian server (fail2ban and ufw installed with the OpenSSH profile enabled) with a user with default shell /bin/bash: $ grep "$(whoami)" /etc/passwd ...
0 votes
1 answer
1k views

Error EOF using pscp to transfer files to windows server

I am using pscp to transfer files from my computer to a windows server but it doesn't work. here is the command I'm using and the result pscp -v -scp file_test.txt LOGIN@HOST_ADDRESS:C:.\ Looking ...
0 votes
0 answers
505 views

Remote Command execution after scp transfer

I have been having some trouble doing remote execution after data transfer. Goal: SCP zipped data to a remote host then execute a remote command to unzip that file.I would prefer to do this in one ...
0 votes
1 answer
916 views

using shortcut (alias) to throw files to server with scp

Does anyone know how to do this? I scp to my vps a lot and I'm trying to create a shortcut. I normally connect with "ssh username" because I have a config file setup and use keys, but what ...
2 votes
1 answer
2k views

Why can't scp resolve the second hostname?

I am trying to copy from one remote-machine to another using my local machine. Both remotes are added in the local ~/.ssh/config as follows: Host source Hostname <public-ip> ...
1 vote
1 answer
181 views

SCP, transfer file across 3 computers

I'm having trouble understanding if it's possible to transfer a file from one PC to another passing through a third one. To explain better my situation: I have: My local PC (PC-1), where I have my ...
2 votes
1 answer
16k views

SSH troubles: ssh_exchange_identification/kex_exchange_identification: Connection closed by remote host

I am connecting to my hoster's server via ssh/scp, mostly from Linux machines, and things were working well for years. Now, all of a sudden, the majority of all connection attempts fail before getting ...
2 votes
2 answers
623 views

rsync not skipping untouched files

I transferred about 300GB of files with scp from one server to another. Sadly I forgot the -r option, so part of the files that were in subdirectories were not copied. I verified that the files that ...
0 votes
1 answer
483 views

Open WinSCP stored session using commandline

I want to open WinSCP GUI and have it open a stored session automatically, need it for a Windows shortcut to a stored session. I was hoping this could be done using a commandline option. Been looking ...
1 vote
0 answers
405 views

Scp Tab completion for remote wsl bash does not work as the other way round

On wsl(ubuntu), I can do scp somefile ubuntu:somepath, and use tab completion for the somepath, as I use keys to ssh. But I cant do this in reverse. On remote ubuntu I do scp somefile wsl:, and then ...
63 votes
4 answers
204k 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 the .ssh directory and saw ...
0 votes
0 answers
1k views

Difference between scp and sftp within curl

I have encountered a serious problem with curl. I want to copy a file from a raspberry on a remote server working under Windows 10. RSA key is installed on the server, everything is working ...
1 vote
1 answer
979 views

scp error: unexpected filename . / n00b dealing with Chef on Ubuntu

I am very new to the Ops world, like really really new so often what I do might feel like copy/pasting and I wouldn't know what command means what and what an argument is, so please bear with my ...
0 votes
0 answers
2k views

SSH Network is unreachable

I have 2 ubuntu systems , 1 lan cable. I need to transfer data(FILE OR DIRECTORY) using lan cable.( Note : there is no online network connection) I tried using ethernet and connected both ends in ...
0 votes
0 answers
302 views

How do I send files from my personal computer to a cluster?

I know to send files onto my laptop from the cluster, I do something like: scp username@remotecomputer:/path/to/file/you/want/to/copy where/to/put/file/on/laptop But what about uploading a file from ...
1 vote
0 answers
4k views

How to find the port used for SCP?

I'm trying to copy a file from my local (Windows 10, Cygwin) machine to a remote (Raspberry Pi) machine using scp, I get a time out error: $ scp main.bin [email protected]: ssh: connect to host 123....
0 votes
0 answers
590 views

scp stopped working in the middle of a large file transfer to SSH server with Nautilus

I have a Fedora 35 home server set up. I use sshd with the default settings. Up until today, I could ssh and scp without any issues and had no problems with this machine. This morning, from my two ...
0 votes
1 answer
470 views

Unable to sudo scp with ssh key

I need to run a script that contains some instructions which must be run as root, and a scp: sbt assembly # requires sudo scp -r -p myfile [email protected]:/root/spark/root # doesn't require sudo I ...
0 votes
2 answers
169 views

How do I connect three machines (one PC and two laptops) together though ssh tunnel?

I am a student at a college and therefore am very limited over what I can do with routers and whatnot. I need my PC tower to have ssh access to my school laptop and to my work laptop. I need these ...
0 votes
0 answers
426 views

SCP hanging when uploading large amount of files

I am transferring a large amount of files, about 17,000, from my computer to an EC2 instance with an S3 bucket mounted to it. For some reason, I only ever get somewhere between 200 to 400 files ...
1 vote
2 answers
2k views

Upload files to Backblaze B2 with SFTP or FTPS or SCP?

We have a Backblaze B2 business account, and from my understanding it should be possible to upload files using SFTP. Or alternatively FTPS or SCP would also be fine (I just want to be able to upload/...
0 votes
1 answer
520 views

Cannot send file from local machine to the server using SCP despite being able to login via SSH

I am trying to send file from my local machine (Ubuntu) to Oracle VM (Oracle Linux). Command I tried is below, but it doesn’t work. I can connect to the server fine using SSH. scp -r -i /...
2 votes
1 answer
907 views

scp - permission denied (publickey)

I am able to ssh into a remote server ssh -i "C:\Users\kong\Documents\prl.ppk" [email protected] but not able to scp scp -i "C:\Users\kong\Documents\prl.ppk" [email protected]:~/...
1 vote
1 answer
1k views

scp w/ BindAddress

Apologies if I get some terminology wrong here, I'm very much not a networking expert. I have a server on my local network but am connected to a VPN, and to reach the local server via ssh on my Mac, I ...
0 votes
0 answers
297 views

ssh works but not scp - Permission denied (publickey)

I am able to ssh into a remote server ssh -i "C:\Users\kong\Documents\prl.ppk" [email protected] but not able to scp scp -i "C:\Users\kong\Documents\prl.ppk" [email protected]:~/...
0 votes
1 answer
971 views

Script SCP with public key

I need to configure a script to copy some files from one Ubuntu server to another. The key uses is allowed in the authorized_keys on remote server. I'm trying to configure this script: #!/bin/sh #...
0 votes
0 answers
897 views

Transferring data from Windows to Ubuntu is way slow

I'm trying to upload a 6GB file from Windows to a (remote) Linux machine. Results: over both SFTP and SCP (WinSCP): tx speed is 90-100kbps. over plain insecure FTP (FileZilla): tx speed is 80-100kbps....
0 votes
1 answer
2k views

scp transfer through an intermediate host

I have 3 servers: A, B, C and need to transfer a file from A to C. ssh is only possible from A to B and from C to B (see below), because A and C are on 2 different VPNs. A → B C → B SSH is not ...
0 votes
2 answers
716 views

rsync through ssh proxy using a key that is on the proxy

I am trying to copy files using rsync from a server A, to a server C, through a bastion server B. A -> B -> C This can be achieved normally through using the -e option, like: rsync -e 'ssh user@...
24 votes
9 answers
93k views

SSH from Windows to Linux without entering a password

I am trying to use ssh/scp from Windows to Linux without having to enter a password. This is what I have done, and it doesn't seem to work: generated public and private keys using Putty Key ...
0 votes
1 answer
1k views

scp fails with -T in different scp versions

I'm having a strange behavior with scp and the option -T in Ubuntu 16. On one PC with scp version 1:7.2p2-4ubuntu2.8 I run the command to scp a file from remote PC to my local PC and the file gets ...
0 votes
0 answers
504 views

can't find scp file from remote server on my local machine

I copied file from remote server, through SSH scp command, on my local machine. using realpath command I see that it exist on my machine but when I try to open it, it says that : no such file or ...
-1 votes
1 answer
282 views

Is openssh-server safe on a local network?

Quick description of my situation: 2 home use computers, both connected to a standard AT&T router. Both computers get a 192.168.1.x IP address from the router. I have no idea what the IP of the ...
1 vote
2 answers
5k views

How ca I make CentOS 7 accept SSH while denying SCP?

On a CentOS 7 server, I'd like to configure it such that: It accepts SSH connections, like PuTTY It denies SCP/SFTP connections, like SCP, WinSCP, and FileZilla Is such a configuration possible?
19 votes
3 answers
17k views

Scp the current dir `.` to another name

This is an edge use case, but I can't find a solution. I want to copy the current directory ., without necessarily knowing or caring for its name, to a new directory. Using scp. Bash does not seem ...
0 votes
1 answer
345 views

How to SCP from remote Windows to host Linux if the source path has more than 8 sub-directory levels?

I have a remote windows machine with built in openssh server on it. I tried to scp a folder named 0 from my home dir in remote Windows to local Downloads: scp -r micro:0 Downloads/ The results in ...
0 votes
2 answers
958 views

FIle Transfer broadcasting

I am curious are there implementations where one can send a file over a broadcast address like in IPv4 addresses to multiple end hosts? For instance can scp perform a file Broadcast to multiple hosts ...
2 votes
1 answer
21k views

Port 22 won't open even after enabling it on Windows Firewall settings

I'm currently trying to transfer file between my two local computer (laptop running Linux & PC Windows 10) by SHH using scp cmd, see here I'm trying to transfer from Linux laptop to Windows PC. ...
0 votes
1 answer
2k views

Is there any difference between default scp and PuTTY pscp (with -scp) protocols?

I'm trying to automate a task that requires remote file transfer. The file provider manual specifically says that It needs a pscp (PuTTY version of scp) call to be made, and also already includes the ...
1 vote
5 answers
55k views

how to copy a file from linux to windows with scp command?

I would like copy a backup file from image vmware linux to windows but I don't know how to process it? I tried: scp /source/backup.tar.gz [email protected]:/c:\ProgrammefilesC:\Documentsand Settings\...
67 votes
13 answers
133k views

Scp over a proxy with one command from local machine?

I have my local.machine, the proxy.machine and target.machine. local.machine doesn't have direct contact with target.machine, but needs to go through proxy.machine. I want to scp a file from target....
138 votes
6 answers
150k views

scp files via intermediate host

I have access to 3 machines, A, B, and C. The only possible (ssh) connections are: A -> B B <-> C I need to get files from A to C, so I could scp the files from A to B, and then scp them ...
0 votes
0 answers
434 views

Transferring a file from a Linux machine to a mac Os using SCP program

I have successfully transferred a file from a Linux machine to windows. But I am unable to transfer the file to a MacBook Air that I have. I have already tried going to system preferences and was able ...
0 votes
1 answer
2k views

scp: ambiguous target error, with quotes, escape characters in Windows 10

Getting scp: ambiguous target while transferring file to white spaced folder name in Windows 10 (both pc). I already tried solutions mentioned in here and also tried another solution on different ...
-2 votes
1 answer
6k views

Native SCP in Windows 10 (scp target is Windows)

I didn't know that Windows natively supports SCP (Secure Copy): e.g. scp "C:\somefolder\somefile" [email protected]~/somefolder/somefile Is there only this "client option" to ...
8 votes
1 answer
4k views

How can I resume a broken SFTP download in Window 7 console?

In my Windows 7 console, I can download file from SFTP with the command d://putty//pscp -P 22 root@serverip:/root/movie c://movie How can I resume a broken download in Window 7 cmd console when ...

1 2
3
4 5
15