Questions tagged [scp]
SCP (Secure Copy) is a secure protocol based on SSH used for transferring files between computers.
719
questions
-2
votes
1
answer
34
views
How to backup a server with no access to root or any sudo-enabled user when no-password SSH is used?
We have a terrible website with no backups hosted on a server that can only be accessed via no password ssh (public/private key) on a different server. I would like to backup the entire server to ...
0
votes
0
answers
11
views
How to backup a server with no access to root or any sudo-enabled user when no-password SSH is used? [duplicate]
We have a terrible website with no backups hosted on a server that can only be accessed via no password ssh (public/private key) on a different server. I would like to backup the entire server to ...
0
votes
1
answer
17
views
SCP destination path with drive
I want to copy a file to another server using the following command.
scp source_file_name username@destination_host:destination_folder
In my case, my destination folder is in a different drive. So, I ...
1
vote
1
answer
38
views
Getting "Remote to remote not supported" when copy file from Windows host to remote Ubuntu server using pscp
I'm trying to copy a file from a Windows host to a remote Linux (Ubuntu) server using pscp.
This looks straight forward at first:
pscp -P 22 'C:\text.txt' user@ip:~/Downloads
However, I get the ...
0
votes
1
answer
26
views
SCP to copy files from vmware machine remotely
I have 2 machines A1(Windows11) and A2(Linux Mint) on 2 different networks N1(Korea) and N2(Japan) respectively.
Inside A1 I install a Linux guest A11 and now I would want to copy a file from A11 to ...
1
vote
4
answers
112
views
How to test scp without sending a file?
I have a setting where only scp connections are allowed to a remote server, with ssh login being disabled (i.e. you can't get a shell into that server), and I am seeking a clean way for testing ...
0
votes
1
answer
10
views
I need to change the port and run an authetication key through an scp command
Hi I am trying to send a file to a linux server but the ssh connection is not port 22 and i need to pass an identity key through as well. Is there anyway i can change the port and use the -i in an scp ...
0
votes
0
answers
111
views
Permission denied (publickey). scp: Connection closed
I'm having a remote server running SSH,
I use the scp from my local computer like this:
scp filename.txt username@IP:/data/production
it asks for the password, I supplied it, and then I get
...
0
votes
1
answer
45
views
Transfer a file via scp with key auth
I need to transfer a file from machine source to machine target, executing the scp command on source machine.
The source machine has a private key, and the target machine has source's public key ...
1
vote
1
answer
48
views
scp doesn't trigger initial prompt even though known_hosts is empty or deleted
I have a bash script to copy a file to a remote server using scp and expect. The script is as follows:
#!/usr/bin/expect -f
set port [lindex $argv 0]
set file_to_send [lindex $argv 1]
set login [...
1
vote
0
answers
38
views
How to deny access to shared folder from a specific user on Linux ubuntu
i have 3 machines on my virtual box, Server, Host 1 and Host 2
i shared a directory from the server to both the hosts using the scp command
but now i need to deny the access to the shared folder from ...
0
votes
2
answers
49
views
Copy files between VMs using localhost as jumpbox
I have encountered SCP through SSH-forwarding in cases where
VM-A <---> VM-B <---> VM-C
and a file is needed to be transferred from A to C or vice versa, ie. B is the Jumpbox in this ...
1
vote
0
answers
307
views
cat through ssh does not work, it hangs on "debug2: exec request accepted on channel 0" and scp never finishes
I trying to print a file through ssh on CentOS7 but it does not work somehow :
$ time timeout 60s ssh -vvv SERVER-01 cat /etc/yum.repos.d/CentOS-Base.repo
OpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan ...
1
vote
0
answers
93
views
How do I scp from inside a Linux container to Windows 10?
I am able to scp a directory from within a Linux (alpine:3) docker container to my windows 10 box (a VM). The problem is that after the copy successfully completes, it prints this error:
sshpass -p $...
1
vote
2
answers
268
views
Directory contents not fully copied by scp command
I'm running Windows 10, and the server is on Debian 10 and I'm copying a Svelte build directory from my computer to a remote server. I'm using the command to copy the files:
scp -r ./build user@remote....
0
votes
1
answer
121
views
Using Rsync Transferring files from server to client too much slow?
Actually i am transferring files from one AM5728 Board to another AM5728 board (with Aargo Linux Kernel) with 1Gbps speed.
Tested iperf command speed is 750Mbps.
Transfer files from one board to ...
0
votes
1
answer
37
views
Why Do ssh and scp See Different File Systems
My ssh to a host "sees" one file system; my scp sees a different one. How can this be the case, and how can I fix it. e.g.
$ ssh me@otherpc 'ls -l /tmp/media-files.txt'
-rw-r--r-- 1 me me ...
1
vote
1
answer
5k
views
What is the correct usage of the scp command in Powershell?
I am trying to retrieve some data from a remote directory (with an IP address) using the scp command in Windows Powershell. However, when I enter the command
scp -r root@<remote IP>:<remote ...
0
votes
1
answer
244
views
It does not appear that the file is downloaded
I have applied the following command:
scp xxLx@10.201.23:/Ejemplo/CLEAN.txt \Users\L\Downloads\CLEAN.txt
I am notified that the file is downloaded, but the file does not appear in the folder. My ...
2
votes
1
answer
529
views
Broken pipe on transfer from/to fedora system using rsync/rclone/scp
I'm trying to send some files with around 2GB to my home server running Fedora 36. On my Laptop, I have Pop OS! 22.04. Both are directly connected to my router via Ethernet.
Sadly, I'm getting errors ...
1
vote
1
answer
1k
views
Is there a way to transfer a file from windows 11 to remote Linux server without winscp or scp?
I have a locked windows 11 laptop in where I am not allowed to install any third party application such as winscp or git bash. Someone with admin permission can do it though.
What I need is transfer ...
1
vote
2
answers
370
views
Copy file from Windows to Linux server by using jump server
I have Windows machine and Linux 1 and 2 servers.
Windows machine doesn't have a direct access to Linux 2 server. I need to go via Linux 1.
How can I copy files from Windows Machine to Linux 2 server ...
0
votes
1
answer
770
views
scp no such file or directory exists, but the file does exist
First, I want to say I am sorry if this is posted in the wrong section. this is my first post here, and this is the first time I'm making an account.
What I am trying to do is copy a file from a ...
0
votes
0
answers
51
views
Automatically entering password for SCP in Windows [duplicate]
I want to run scp in Windows (specifically, C:\WINDOWS\System32\OpenSSH\scp.exe), and provide it a password via commandline. Note: I'm aware of other options like PuTTY's PSCP or winscp, but prefer to ...
1
vote
1
answer
41
views
Why does scp not work while scp -4 works?
I have an issue with scp:
scp -pr xyz.zip myuser@server.com:/home/myuser/tmp/ does not work, while
scp -4 -pr xyz.zip myuser@server.com:/home/myuser/tmp/ works, what could go wrong here?
My assumption ...
0
votes
0
answers
19
views
SMB capped at 2 megabits on one device - same file transfer over SCP is 120 megabits
I have an Ubuntu server running a vairety of services, including samba.
Recently, one of my Stable channel Windows 11 PCs has effectively lost all useful throughput (consistently 2mbit). Any other ...
0
votes
0
answers
266
views
How to use curly braces and wildcard with an SCP command
I have a 3rd party file transfer as such:
scp -3 host1:/source host2:/destination
Without quotes curly braces work and the shell expands on the source remote host1, with quotes it doesn't expand:
scp ...
2
votes
1
answer
3k
views
Copy file using scp fails (debug1: Exit status -1)
I wanted to copy a single file from a remote server to my local machine.
I do not have root privileges on the remote machine but I can successfully SSH into a user given the password.
However the ...
0
votes
1
answer
400
views
Winscp to Linux guest SCP account, access denied
I'm trying to set up a restricted SFTP account on a Kali Linux box so that I can have random co-workers dump files without having to give them a ton of access (or my password). I followed the ...
1
vote
0
answers
147
views
Copying a file from a linux embedded system to local machine connected by a Serial connection
I am connected to my embedded system by serial connection to my laptop(windows), and using puTTy I booted it up. It is collecting data and making a .csv file of the collected data. I would like to get ...
-1
votes
1
answer
157
views
SCP won't transfer file... Advise: SSH key issue?
very time I'm trying to SCP something into my local linux it tells me... several things actually, starting with:
Permission denied (publickey). lost connection Progressing forward, in this case its an ...
0
votes
0
answers
304
views
logging SCP activity in remote server
I have a CentOS server which is used by many person with same user.
All users are permitted to upload and download files with scp or winscp.
Is it possible to log all file transfer activity(in and out)...
2
votes
1
answer
152
views
scp recursive upload is incomplete
I want to transmit with scp a folder and it's contents, including subdirectories. The size of the directory is 16.2GB and it contains 40.647 files and 7.463 subdirectories. The local machine runs ...
0
votes
0
answers
126
views
Limit scp from only a particular group of systems for a group of users
Allow scp from only a particular group of systems for a particular group. I think an example will be more effective to understand my requirement.
Users : user1, user2, user3 utpto user20 ( All this ...
1
vote
2
answers
470
views
scp : "unexpected filename: . ", but I don't see a "."
I want to scp a .sh script to /dev/shm but it gives me
error: unexpected filename: .
I don't even see where there would be a lone . in either the script or the directory.
The full command was:
scp -r ...
0
votes
1
answer
550
views
Sending command: scp -v -t / exec request failed on channel 0
Attempting to send a simple txt file (soon to be csv files) from Windows Server 2019 using scp command (or sftp, or ssh) to a remote server. Remote server employee gave us a username and password to ...
0
votes
1
answer
1k
views
Transfer files from one remote server to another remote server in WinSCP
I want to transfer some files from one remote server to another remote server. The issue is these servers are accessible to be by doing hop from a jump server.
I am able to get into these servers ...
0
votes
1
answer
97
views
How to scp java innerclass with '$1' in its name
Files
sample$1.class
sample.class
scp_test.sh
scp_test.sh
#!/bin/bash
TARGET=('sample.class' 'sample$1.class')
for dd in "${TARGET[@]}"
do
FILENAME=`basename ${dd}`
scp ${FILENAME} ...
1
vote
0
answers
254
views
Can you sftp and scp into windows openssh with bash set as the default shell?
When the default ssh shell is set to powershell:
New-ItemProperty -Path "HKLM:\SOFTWARE\OpenSSH" -Name DefaultShell -Value "C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe&...
0
votes
1
answer
948
views
Copy folder from remote server to local system on windows
I am using following command to copy folder from remote server to my local system and I am on windows:
scp -r user@example.com: /var/www/projects/files/styles/image_style_150_ppi/public/misc/ C:\Users\...
0
votes
0
answers
163
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
...
0
votes
0
answers
809
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@...
0
votes
1
answer
6k
views
Executing a python script via SSH on remote and scp on localhost
I am new to this and need some advice on resolving my problem.
I have a python script on a remote server. I want to execute that script from my local system and then transfer the result file generated ...
0
votes
1
answer
356
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
0
answers
285
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
445
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
970
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
88
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 ...
1
vote
0
answers
156
views
SCP recursive copy with illegal Windows filenames
I've been looking all morning, and I can't seem to find a straightforward answer to this.
I have a remote Linux box, and a local Windows one, executing:
scp -r blah@remotelinux:/somewhere/else ./
...
1
vote
0
answers
295
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 ...