Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scp]

SCP stands for Secure Copy Protocol and is related to questions regarding secure file transfer.

0
votes
1answer
31 views

Ping works, wireless connected, no stable internet

I'm running into probably a very niche issue here, but bare with me: I have an old (2014) laptop that I've converted into a linux desktop at home. Mostly for storing extra stuff over scp. Today, all ...
0
votes
1answer
32 views

Dump a database and scp it to a remote server with date hour suffix

I would like to dump a database and scp it to a remote server and suffix the file with date_hour. Here is what I have done (of course it doesn't work) : mysqldump -u root -p myDb > myDb.sql &&...
1
vote
1answer
104 views

how to use find in scp command

I would like to use scp command fo transfer some files from remote server to local machine. The problem I have is to find the files and then direct them to scp command. I don't want to generate an ssh-...
0
votes
2answers
44 views

How to use scp -i without prompting the key

I use the following line in a gitlab pipeline : scp -i "$SSH_PRIVATE_KEY" -r dist user@1.1.1.1:/home/user/preprod However when this line is executed the private key is prompted in the pipeline ...
0
votes
2answers
37 views

scp output from remote grep back to my machine in a script

I am trying to write a script that would use a ssh session to do a grep on a huge logfile, cat the ouput to a temp file and scp the temp file back to the client machine: ssh user@server grep pattern ...
0
votes
1answer
23 views

Error while running Bash Script within landscape web UI

On landscape quickstart I running a simple script from the UI. My script look like that: #!/bin/bash cp $LANDSCAPE_ATTACHMENTS /home/afadmin/Downloads/ I got the following error: cp: omitting ...
0
votes
0answers
204 views

ssh works, scp hangs forever

I would like to copy files from my laptop to another machine - a headless TX2 -- over my home wifi network. Both my laptop and the TX2 are running Ubuntu 16.04 and both have the latest version of ...
0
votes
0answers
23 views

Using scp from windows to linux - handling of white space in path [duplicate]

In the source machine there is a folder with a white space in folder name, typically using "/home/RUN DATA/" for example in ls "/home/RUN DATA/" would be able to handle the white space. However ...
0
votes
0answers
200 views

fix scp autocomplete in 18.04

in 16.04 there is no /usr/share/bash-completion/completions/scp and tab will work with scp and local paths in 18.04 there is a /usr/share/bash-completion/completions/scp and tab will fail with scp ...
1
vote
0answers
666 views

How to use sshpass to sftp upload file?

I have following : $ cat upload.sh sshpass -f ~/path_to_password/pass.txt sftp user@remote.location.net:/pools/path/ << EOF put backup.tar EOF When i execute the upload.sh it shows nothing (...
0
votes
0answers
35 views

Copy file to another virtual host

I'm gonna copy file to virtual ubuntu via: scp -r hadoop hadoop-slave-1:/opt/hadoop But I get the error below: ssh: connect to host hadoop-slave-1 port 22: Connection timed out lost connection I ...
0
votes
0answers
37 views

file transfer using SCP

I want to transfer my file to other system using scp. It is a tar.bz2 folder having just 300 MB size but it is taking 6 hours to transfer and still 49% complete.. Now it is disconnected at 49%. I want ...
0
votes
0answers
93 views

How to copy file from Ubuntu computer to remote box via SSH?

How to copy files from Ubuntu computer to remote box via SSH using SecureCRT utility? So I'm connected to media box via SSH, then cd to target folder: next how to copy file from computer into the ....
0
votes
0answers
101 views

Ubuntu 16.04.5 LTS: How to sense whether a remote /media/pi/xxxx directory is a real USB drive?

I have a Linux cluster working fine. Ubuntu 16.04.5 managing 8 Rpi3B data loggers. Results can be seen at http://www.SDsolarBlog.com/montage It works great. Ubuntu is the best way I have found to ...
1
vote
2answers
41 views

I accidentally deleted a file while it is still transferred via SCP. What happens?

I have created a .tar.gz file for backup purposes. While it's still in the middle of being transferred via SCP (it's a 6 GB file), I accidentally deleted it in the SSH session. The SCP transfer is ...
0
votes
0answers
67 views

How to SCP a file from a different Partition of my system

I have a dual os machine(windows and ubuntu). I am currently using ubuntu and I want to copy a file from my machine to another. To do that I used the following command: scp /path/to/file user@xx.xxx....
3
votes
1answer
168 views

List all files then execute script with part of the filename

I'm looking to list all files in a folder: ABC123.cfg XYZ456.cfg EFG999.cfg The file names, without the .cfg relate to a remote server name, ABC123 etc. I want to copy a couple of files to each of ...
-1
votes
1answer
42 views

Why server name not used in sftp get and put

To transmit a file, sftp syntax is: get /A/B/abc.txt /C/D/ In contrast, scp syntax for the same task is: /A/B/abc.txt username@servername:/C/D/E/ Why don't we need username@servername in case ...
3
votes
1answer
117 views

scp \033H message

Having a weird scp issue: $ scp user@server.org:~/test.txt ./ Password: \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H \033H ...
1
vote
3answers
779 views

SCP over SSH with no password - cannot get it to work

I have an Ubuntu 16.04 server with SSH, I have configured a keypair so I can SSH on to a remote system with no password, this works fine. I am trying to SCP from Local (system1) to ther remote (...
0
votes
0answers
1k views

SCP to copy a file from Linux to windows is failing with Permission Denied error

I am using scp command to copy a file from Linux to Windows. It's failing with the mentioned log. Steps accomplished: Installed openssh in windows copied id_rsa.pub key to Linux box under .ssh/...
7
votes
1answer
1k views

Why rsync is 2x faster than sftp?

I'm transferring huge files, over a network to a destination server, totaling ~ 67 GB with individual zip files of size ~ 7GB. I tried copying to the destination using both sftp and rsync. rsync ...
1
vote
1answer
376 views

Cron job : dump and scp tar dump to remote server

I want to make a cron job that dumps a MySQL database and tars the dump with date|hour|minute and then scps it to a remote server. 0 */2 * * * mysqldump -uroot myBase>myBase.sql && tar -...
0
votes
0answers
345 views

scp doesn use /etc/host and returns strange error “Inappropriate ioctl for device”

So I have an entry in /etc/hosts 192.168.1.100 dev.sylwester.no getent hosts dev.sylwester.no gives the above output. Appropriate line in nsswitch.conf looks like this: hosts: hosts: ...
0
votes
1answer
131 views

escape character not working in scp

I am trying to transfer some file through scp. But it is not working, scp "vogo_psql_db\:2017-08-30T18\:00\:01.762662" "username@xx.xx.xx.xx:db-dump" ssh: Could not resolve hostname vogo_psql_db\\: ...
0
votes
1answer
342 views

SCP the other way Around [duplicate]

Let me redo this, I was accessing a sever via ssh, i can access the server easily from my system (the server is in my local network). I tried copying a file from my local system to my server and it ...
0
votes
1answer
88 views

How to managing ECDSA key fingerprints on mobile host

I have a number of automated scripts that use SSH authentication when connecting to a remote host (mobile robot in my case). The problem I have is that this robot is sometimes located in our lab, and ...
11
votes
1answer
2k views

How do I scp files of size less than x?

I am developing something on my laptop and scp'ing the files to a high performance PC (a server with no monitor). Out of laziness I just do this currently (on the laptop): scp -r ~/project/* server:~/...
0
votes
1answer
312 views

scp command doesn't transfer files

I'm trying to upload a folder to the root directory at my server $ scp -r folder root@my.server.ip: then I see some like: However when I go to server ssh root@my.server.ip and check files (using ...
0
votes
0answers
358 views

Capturing the “progress bar” shown in a terminal

I am looking for the "verbose" output of scp, as shown by the following command, but excluding all lines containing debug1:: scp -v /path/to/some_very_large_file user@host:/home/user/test.deleteme 2&...
1
vote
1answer
141 views

How do I sent files from Ubuntu to windows via terminal? [duplicate]

I want to sent files over a private network from Ubuntu 16.04 to a windows box.(Its an IOT box) I am able to scp into other linux devices but how do I send files to windows? I want to do this via ...
0
votes
0answers
3k views

SCP permission denied when copying from server to local

So I am setting up a vpn and I keep getting a permission denied error when I use scp. I've tried several methods (the ones I found online) but nothing seems to help. root@debian-512mb-fra1-01: scp ...
1
vote
1answer
646 views

expect script to scp via an intermediate host

I found a command to directly scp my file to a host (C) via another host (B) from my computer. The command is in this form: scp -oProxyCommand="ssh -W %h:%p B" thefile C:destination I used it and it ...
0
votes
1answer
65 views

Is there a shorthand way to write 'scp' to copy back to connecting host?

If I'm already remoted into a machine via SSH, is there an easy short-hand way to write an scp command that will copy the file back to the computer that is connected? In other words, if I'm on ...
0
votes
0answers
46 views

Permission denied to modify www-data file using SFTP [duplicate]

I have nginx running on ubuntu 16 with the webfiles owned by www-data:www-data with permissions -rw-rw-r-- (0664). When I try to upload and overwrite a file using WinSCP (SFTP) using the ubuntu user, ...
1
vote
2answers
5k views

scp command returned `no such file or directory` error

I am trying to copy files from my laptop to a host via ssh command: roberto@xxxxx1:~$ scp /home/roberto/Metagenoma_MEL_COLS/Mix-MEL_S10_L002_R1_001.fastq.tar.gz roberto@xxxx.xxx.xxx.es:/media/disk7/...
0
votes
0answers
431 views

scp from remote server with ssh gateway to local connection time out

The command I am running is on remote: scp -v /path_to_file/file.png username@10.x.x.x:/target_path/file.png The debug output message is: connect to address 10.x.x.x port 22: Connection timed out ...
6
votes
4answers
29k views

How to copy (or move) files from remote machine to local machine?

I SSH tunneled from my local Ubuntu machine to a remote Ubuntu machine and I want to copy/move files from the remote Ubuntu to the local one. I need to do that from within the SSH session (i.e, from ...
3
votes
1answer
78 views

Does scp over cp matter when copying to a remote SSH location?

I am a little confused here. Say I do the following: cp /this x@x:x/to-this. Will not this already be a secure way of transferring the file since it uses the SSH protocol? Or is scp when used with ...
0
votes
2answers
672 views

Can you tell SCP to cancel [as opposed to renaming] if file is present?

In order to help avoid generating errors, I need a way to stop an automated scp script to stop from overwriting files if they are already present on the remote folder, and just do nothing instead. Is ...
0
votes
3answers
114 views

Scp Command issue

I am trying to copy the image maldives.jpg from another computer into mine using scp. However when I enter the line: scp -r ubuntucomp@192.168.1.14: ~/maldives.jpg I get: ...
1
vote
0answers
277 views

scp not working when my ssh is working perfectly

I am having issues in scp a file to another user: scp filename USERNAME@192.168.0.1:~/path/to/directory I only get the below line, but scp doesn't happen: SSH_AUTH_SOCK=/tmp/ssh-KjEHW3vNQqjE/agent....
0
votes
0answers
395 views

How to transfer files from one ssh to another ssh by scp?

I want to copy files from one ssh to another ssh using scp command. scp user@host:~/file/to/be/copied user@host:/location/to/save/file/ But Following error occurred: Permission denied (publickey). ...
0
votes
0answers
366 views

IPv6 not working from terminal

I was able to scp files from my VPS using IPv6 but after some mess-ups (like using shadowsocks and Foxyproxy to circumvent GFW) with my Ubuntu 16.04 I have a strange problem. I can access IPv6 ...
1
vote
1answer
150 views

How to achieve fast transfers over 10Gbe

I'm trying to transfer files over 10 gigabit ethernet. However the maximum speed I can achieve between 2 RAM-Disks (mounted on /mnt on each node) is around 200MB/s: root@odin$ scp /mnt/largeFile marc@...
10
votes
2answers
1k views

Is there any SCP program available for Ubuntu that does not require SFTP on a remote host?

I need a program that can manage files on a remote device running Linux using SCP. The remote device runs OpenWrt. On Windows there is a perfect one WinSCP. it is weird that there is no native program ...
2
votes
1answer
1k views

Why does a .sh file's md5sum change when copying to another folder?

I have downloaded a sh file from a webpage. I want to copy it to another machine so I can install it there. The other machine is an imx6 tiny rex. I tried to copy/move/scp to my Ubuntu machine to the ...
0
votes
2answers
2k views

How to run scp command without password from ubuntu to centOS machine

I want to run scp command from my machine(Ubuntu_14) to my server (CentOS_6) I have already generate a pair of authentication keys, also append my public key to my servers .ssh/authorized_keys, now I ...
0
votes
1answer
636 views

SCP from ssh remote machine to my local ubuntu machine

I am trying to scp some files from a remote machine to my local ubuntu 16.04 machine. However, I am getting error with the port and network. my machine name is trina and I am trying $ scp -r ...
0
votes
1answer
1k views

scp creates undesired file permissions

I'm trying to copy files from a remote linux system (on which I am not the super user) to my own local system, using the scp command on Ubuntu 16.04 LTS. scp remote_username@remote-host:/path-to-...