4
votes
2answers
44 views

How to pipe a remote file to stdout over scp or sftp?

Using ssh, it is easy to print the contents of a file using ssh host 'cat file.txt' When ssh is disabled, and only SFTP is enabled, running the previous command gives the following error: ...
3
votes
2answers
60 views

transfer a file to remote dir only if doesn't exist without replacing

I'm using CentOS linux. In one line cmd, that returns 0 if success, non-0 if failure, I need: Transfer a file to a remote server. Don't transfer the file if filename exists in remote server ...
0
votes
5answers
64 views

Downloading file through SSH with a “proxy” machine inbetween

I need to download a file from machine C to machine A. To do that, I need to login to machine B (I am doing this using scp), as I cannot access C directly from A. Would it be possible to download a ...
1
vote
2answers
86 views

Shell Script - how to scp into remote server and download files and protect password

I have a remote server that I need to download Apache logs from. I can manually scp into the server and get the files, but I'd like to put this in crontab. The only way to automate it is to include ...
1
vote
5answers
88 views

How to copy a file from a remote network to the local desktop

So I used SSH to remotely login to another computer on a network. I have many files that I would like to copy over to my local desktop. I am trying to follow this How-to : However, I think one ...
0
votes
1answer
50 views

Equivalent of scp -l bandwidth_cap for .ssh/config?

Short form: You can limit the bandwidth the scp uses with the -l switch, you pass a number that's in kbits/sec. I'd rather set this in my .ssh/config file for certain names machines. What's the ...
1
vote
1answer
56 views

Autocomplete server names for SSH and SCP

I have a few servers configured in ~/.ssh/config, such as alpha and beta. How might I configure Bash such that the commands ssh al<tab> and scp file.tgz al<tab> autocomplete the names of ...
1
vote
1answer
49 views

How to scp from remote host to remote host with pem files and turning off strict host checking?

From my DEV server I'd like to copy files from my stage server to my prod server. I already have SSH keys setup between my DEV server and my stage server. But I haven't had any success trying to ...
0
votes
1answer
101 views

scp to Local Machine After SSHing [duplicate]

From my local machine I can copy files from a remote machine scp remote:/some/file/path ~ But what if I'm already SSHed into the remote machine? Can I do something like this ssh remote cd ...
0
votes
1answer
38 views

Unrar local files to remote server [duplicate]

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
3
votes
1answer
63 views

Unrar local files to remote server

I have two Linux servers, one which has several RAR files and another empty one. I would like to extract the archives and move the content to Server 2. The problem is: I do not have enough storage to ...
0
votes
1answer
63 views

Mount a dropbox directory without installing the dropbox application

This is most likely to be a duplicate question, but I could not find a simple answer for my problem. My situation is as follows: I have multiple accounts on different computing clusters. I want to ...
5
votes
2answers
223 views

How to input a network file using scp to ffmpeg

My problem is this. I have access to a server that hosts many video files, most of them are very large and not well compressed. I intend to make a reduced quality smaller size copy of these on my ...
0
votes
2answers
53 views

what is the purpose of -i in front of scp and ssh commands?

What is the "-i" for in the command "scp -i key *username*@address: path 1 *path 2*"? Note: I've seen "-i" used in ssh commands as well.
0
votes
0answers
23 views

How to allow user to only rsync/download only one directory through SSH [duplicate]

What I want to do is to give to user a simple script to run, that will sync some directory from my VPS to their machine, authentication would be done by using pubkey, and I would like to have control ...
3
votes
3answers
222 views

How to parallelize the for loop while scp the files?

I am running my below shell script from machineA which is copying the files machineB and machineC into machineA. If the files are not there in machineB, then it should be there in machineC. The below ...
-2
votes
1answer
73 views

How to use scp and ssh command in a single script without any keys?

How to use scp and ssh command in a same script? First I have to copy one file from my local server to remote. Then from local server itself, I have to check the size of the copied file.
0
votes
2answers
88 views

Can using SFTP with HMAC-RIPEMD160 replace computing file hashes before and after transferring?

As part of my job I often find myself transferring lots of files between my computer and a remote storage space accessible over SFTP. To ensure the files' correct transfer I compute their SHA256 ...
1
vote
2answers
3k views

Bash script calls expect script with master SSH connection

I'm trying to write a bash script that calls an expect script to establish a master SSH connection to be used for the remaining SSH commands in the bash script. ~/.ssh/config: ControlMaster auto ...
1
vote
2answers
473 views

PHP exec expect script with SCP then SSH

I have a PHP page which runs the following expect script to upload a file to another server on my network: #!/usr/bin/expect -f set password [lindex $argv 0] spawn /usr/bin/scp /home/Dave/bin/test ...
2
votes
2answers
80 views

SCP files from machineB to machineA

I am trying to scp the files from machineB to machineA. I need to run the scp command from machineA to copy files from machineB to machineA. The file that I need to copy from machineB is - ...
-2
votes
2answers
525 views

How to copy only the files of a folder(including subfolder's files), but not the folder itself in shell

In Openssh, On the client, the content of path/to/file must be copied to Server. All files in /path/to/file on the client must be copied to /path/to/files on the server. Note: only copy files, no ...
4
votes
1answer
461 views

Weird SSH/SCP progress meter behavior

I've got a very weird SSH behavior and it's making me a bit nervous. Basically the progress meter is totally bogus: so bogus that it's nearly useless. And I fear that there may be something else going ...
0
votes
2answers
59 views

I'm trying to install my public key manually w/ scp

I'm following a tutorial and it's going along well. I used ssh to connect fine. Then I created a private and public key. Which leads me to my first question it says that the keys have been saved to ...
3
votes
1answer
403 views

Rsync over ssh tunnel - using gateway server

Environment: ---------- ---------- /| ------------ | Work | | Gateway| | | | cluster | |Station |--------------------------------| ...
4
votes
2answers
256 views

SCP file between 2 servers that go through few servers

I want to copy a file from server-a to server-d but I can access server-d only from server-b and then to server-c. server-a can only access server-b, server-b can only access server-c, server-c can ...
5
votes
2answers
371 views

How to disable the try again password in ssh command

I want the ssh command to only allow one chance in typing the password, if the password was wrong at the first time the ssh will return Permission denied (publickey......). Is there a flag that ...
2
votes
3answers
4k views

Copying files from one machine to another without asking for password

I am currently using this command. I am on another machine (ip1) scp file.txt root@ip2:/home/praveen/test.c /home/praveen The command will prompt for password. I use it in some shell scripts, and ...
4
votes
5answers
4k views

How to securely allow scp, but not ssh

I work from a Mac Book Pro (called foo). I have a server where my customers scp large files to. (called bar). I frequently ssh into bar, and scp a file (called buzz) to my Mac. bob@foo$ ssh bar ...
1
vote
1answer
126 views

Remote PC accessible by ssh, scp/rsync not working (anymore) [closed]

I've got a remote machine running Ubuntu 12.04 LTS. I've used it lots of times to log in to via ssh and to copy files to via scp and rsync. Today I was able to log in via ssh, but I'm not able to ...
0
votes
1answer
1k views

scp stuck when trying to copy files from Linux to windows

I use the following scp syntax in order to transfer a lot of files from Linux red-hat 5 to windows machine (under Temp directory). SSH server is already installed on windows machine. I use this line ...
4
votes
2answers
94 views

ssh to a specific machine within a network [duplicate]

I'm frequently transferring files and operating programs via ssh, and often from home. The machine I usually work on is a desktop at work that I cannot ssh to directly unless I'm already connected to ...
1
vote
2answers
1k 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
1answer
179 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
110 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 ...
0
votes
2answers
428 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 ...
8
votes
1answer
6k 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 ...
1
vote
1answer
612 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 ...
11
votes
4answers
2k 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 ...
0
votes
1answer
130 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
339 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 ...
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
442 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 ...
4
votes
3answers
4k 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 ...
4
votes
1answer
883 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
308 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
3k 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
16k 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 ...
2
votes
2answers
228 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 ...