scp

How to script scp -r copy ?

Hello, I can't seem to be able to convince scp to behave. For test data ubuntu@domU-12-31-38-00-D4-F1:/tmp$ find /tmp/a1/ /tmp/a1/ /tmp/a1/a2 /tmp/a1/a2/a3 On issuing the command ubuntu@domU-12-31-38-00-D4-F1:/tmp$ scp -r /tmp/a1 domU-12-31-38-00-E2-52.compute-1.internal:/tmp/a1 I would expect the same directory structure created...

How does scp traffic flow between two remote hosts?

If you issue a scp command between 2 remote servers, will the traffic flow directly between the hosts? Or will it flow from Remote1 => Local Machine => Remote2 ? For example I issue this command on my laptop: scp [email protected]:/Files [email protected]:/Files ...

Is there an easy way to copy files between servers using aptana?

Hi All, I have two Ubuntu servers. One is my development box, the other is a production system. They are not identical, though. Most notably, the MySQL server is on a remote server from the production one whereas on the dev system it's on localhost. Basically this means that I can mostly use a clone of the dev system, but if I just ...

regex for scp using pexpect

Hi, I'm using Pexpect to scp and get some files from a remote Linux machine. The script is run from a Linux machine and I'm unable to come to conclusion about the correct regex expression for the prompt which includes an IP.The SCP transfer works fine if IP is hardcoded. It generally looks like: [email protected]'s password: For t...

Can scp be used non-interactively in cron without generating keys?

Hi folks, I have a nightly database backup which I would like to scp to a remote server. As near as I can tell scp cannot be invoked with a password in the command and instead you need to set up keys for the servers? Per this http://www.spaceprogram.com/knowledge/cron_scp.html The remote box owner does not want me to set up the keys ...

Connecting maven with putty

I'm having issues using putty with the mvn-deploy-plugin. I execute: mvn deploy This is what my settings.xml look like: <server> <id>website</id> <username>user</username> <!--<privateKey>c:\putty\id_rsa</privateKey> --> <configuration> <sshExecutable>c:\putty\plink</sshExecutable> <scpExecutable>c:\putty\pscp</scpExec...

SSH Scp - can't specify local path where to copy files from server

Hi, i'm trying to download .zip file from bluehost server to my computer. Like this - scp username@domainname:/pathof/file.zip /home/Public/username/ I found out, when writing local address (where i want to put file) still refers to server address (pressing tab). What am i doing wrong ? ...

SCP with Ruby and a private key

Hi all I have a small problem here: I try to upload a file using SCP and Ruby to a server using a private key. The code looks like: def transfer_file(source_file, destination_file) $log.info("ScpDP: Key=#{@key}") Net::SCP.start(@host, @userName, :keys => @key ) do |scp| scp.upload!(source_file,@folder + destination_f...

Changing an active SCP transfer's bandwidth limit

I have an active SCP transfer throttled down low so it doesn't eat up my bandwidth (scp -l 80). Is there a way to change this limit without stopping the transfer? Or can I stop then resume the transfer? ...

Repeated password prompt with Maven deploy-file to scp repository

I'm trying to deploy an artifact to a remote repository accessible via scp and having a problem with repeated password prompts. My settings.xml contains this fragment: <servers> <server> <id>example.com</id> <username>myusername</username> <password>mypassword</password> <filePermissions>664</filePerm...

SharpSSH's Scp object can't copy files bigger than 2GB

Whenever I try to copy a file that's bigger than 2GB, I get an array index out of bounds exception in the Get method: Scp myScp = new Scp("remotehost", "joe", "mypassword"); myScp.OnTransferProgress += new FileTransferEvent(scpProg); myScp.Connect(22); myScp.Get("/home/joe/bigfile.bin", "/tmp/bigfile.bin"); myScp.Close(); ...

Using scp to transfer a single file into a remote folder that doesn't exist

I'm working on a python script that monitors a directory and uploads files that have been created or modified using scp. That's fine, except I want this to be done recursively, and I'm having a problem if a user creates a directory in the watch directory, and then modifies a file inside that new directory. I can detect the directory cre...

Is there a way to specify the location of a local jsch.jar from within build.xml?

build.xml contains <scp> and <sshexec> tasks, so I provide jsch.jar and other libraries in the same directory together with build.xml. The following taskdef: <taskdef name="scp" classname="org.apache.tools.ant.taskdefs.optional.ssh.Scp" classpath="WebContent/WEB-INF/lib/jsch-0.1.43.jar" /> throws an error A class n...

SCP transfer a file from localhost to a sftp server through php script

Hi Trying to send a file to another server using scp.. cannot use sftp as it is not installed on my server so i am getting a function not found for ssh2_connect. So my only option as i can see it is scp. Now the problem come with i cannot include my password in the php scp script. ie: scp filename username:passwor@server:filename I...

cygwin cygdrive paths and Windows Command Prompt

I'm having a weird issue with cygwin acting inconsistently between installations, specifically scp. I have c:\cygwin\bin in my Windows PATH in both cases. When I run the following command from a Windows Command Prompt, however, I get very different results between the two installations: scp /cygdrive/c/something.txt User@server:${HOME...

How can I transfer a file using scp without a password from a Perl script?

I am writing a Perl script that needs to transfer files between computers using scp. I know about public key authentication, but I need the script to be fully automated, so I can't visit the machines to set up the keys before the script is run. Is there any way to either pass the password to scp from the Perl script or set up the keys f...

error when exec'ing scp from python

hi, this code is giving following error: os.system("scp %s:/export/home/sample/backup.sql %s:/home/rushi/abc.sql" % (a, b)) Permission denied (publickey,keyboard-interactive). lost connection a and b are the command line arguments which accept user name and machine name as arguments: eg: [email protected] . ...

What's wrong in this scp statement?

a=sys.argv[1] b=sys.argv[2] os.system("scp %s:/export/home/sample/backup.sql %s:/home/rushi/abc.sql" % (a,b)) I'm accepting user name and machine name as the command line arguments. Like [email protected] This scp command is giving me following error: [email protected] [email protected] Password: Permission denied (publickey,key...

passing the password as a parameter in a scp command ...

hi all, how can i pass the password along with the scp command.when we use the scp protocol, it prompts us for the password.But i want to pass it as a parameter.Is that possible without using the key generation techniques? ...

Is there a way to use my current SSH connection for an SCP transfer?

I'm already connected to the server via SSH. How can I transfer files from it to the machine I'm connected from using SCP and the current SSH connection? ...