problem about scp-Collection of common programming errors


  • Paulo Ebermann
    ant maven scp jsch
    Please provide your expert option for a issue I am facing at work..Ant SCP task not working – where as I am able to scp using cygwin. Local Environment: windows 7 64 bit, Jdk 1.6.0.24, Ant-1.8.2 (with ant optional dependencies fetched), maven 2 (usign ant run plugin), jsch-0.1.44 Remote Environment: VM Labmanager 4.0, Windows Server 2008 – R2, SSH-2.0-OpenSSH_5.8, JDK 1.6.0.24 I have set password authetication to yes and restarted sshd on remote host. Maven goal is as follows. (btw, I executed

  • tanascius
    maven-2 upload scp wagon
    I try to upload an ear created by maven to an application server using scp.When I tried to run mvn wagon:upload-singleBut I get the following error:[ERROR] Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-single (default-cli) on project de.volkswagen.dps.ear: Unable to create a Wagon instance for null: url can not be null -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:wagon-maven-plugin:1.0-beta-3:upload-s

  • Doorknob
    bash escaping scp
    I’m trying to copy a file using scp in bash with a colon (:) character in the source filename. The obfuscated version of my command I’m using is:scp file\:\ name.mp4 user@host:”/path/to/dest”I get this error:ssh: Could not resolve hostname Portal 2: Name or service not knownI know I could just rename the file and remove the :, but I’d like to know if it’s possible to escape the colon.

  • RBs
    cygwin scp parentheses
    I have a Linux machine and 2 Windows machines. Each Windows machine contains cygwin with an sshd daemon. The Linux machine is the main one I’m using. On the first Windows machine which is XP, I have a file on there that I want to compare with a file on the second Windows machine which is Windows 7. My thinking is that once I ssh into the XP machine, I should easily be able to use the scp command to grab the file on the Windows 7 machine and then run a diff to compare the 2 files but it first get

  • choroba
    linux bash ssh ipv6 scp
    In a Bash Script I iterate over a list of IPv6 Addresses. I try to scp a unique file on each unique IPv6 Device. The unique file for every Device has the IPv6 Address in the filename. Unfortunately SSH/SCP try to resolve something in the Filename and throw this Error: “ssh: Could not resolve hostname file_2001: Name or service not known”How can I supress this unexpected resolving? or is there a possibility to escape something in here?#!/bin/bashDEVICES=”\ 2001:db8::3e81:d8ff:feef:4982 \ “do_copy

  • ThisWillChangeSoon
    unix shell ssh remote-access scp
    I have this script that is doing a scp onto 4 servers and getting the file on the calling server , but when I run it I get the following error:syntax error near unexpected token `then’ line 16: `if[[ $line = $texts ]] ; then The code is as follows:#!/bin/sh servers=(“[email protected]” “[email protected]” “[email protected]” “[email protected]″) tlen=${#servers[@]} count=o total=0 texts=”Untar done you can upload new .tar file” for(( i=0; i<${tlen}; i++ ));doecho “in”scp ${servers[$i

  • dave35
    windows perl ssh sftp scp
    I’m using Net::SSH2’s scp_put method to place one file in my home directory on a Unix server from a Windows box. I am using Strawberry Perl 5.12 (portable version). I installed the libssh2 1.2.5 binaries and then Net::SSH2 from cpan.Here’s my code snippet:sub uploadToHost{my $file=@_[0]; my $host=@_[1]; my $user=@_[2]; my $pass=@_[3]; my $remotelocation=@_[4];#makes a new SSH2 object my $ssh=Net::SSH2->new() or die “couldn’t make SSH object\n”; #prints proper error messages $ssh->debug(1

  • opinuedo
    linux scp
    When doing an scp command to get a file from another server:scp kennyr@[server]:[path]/[file] . I receive this message:protocol error: unexpected I have done some research and the rumblings on the internets are that it is probably something in my bash setting, but I can see what it would be. # .bashrc# User specific aliases and functions# Source global definitions if [ -f /etc/bashrc ]; then. /etc/bashrc fi##### why? #####stty erase “^H” kill “^U” intr “^C” eof “^D” #####stty hupcl ixon ixoff ca

  • flash
    java scp jsch
    I’m using Jsch 0.1.44 to scp a file from one host to another. The relevant code is the following:public boolean transferFileToHost(File fileToTransfer, String destDirectory, String destFilename) {Channel channel = null;try {String command = “scp -t “+ destDirectory + destFilename;channel = session.openChannel(“exec”);((ChannelExec)channel).setCommand(command);OutputStream out = channel.getOutputStream();InputStream in = channel.getInputStream();if(!connectToChannel(channel, in)) {return false; }

  • jasonwryan
    ssh osx apache scp
    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 and on preliminary inspection can manage files on the web server, no problem … and generate no error messages.Surprisingly I can not scp a folder nor document from my desktop to the remote server. Nor can I scp a folder or document from the remote server to my desktop. Each time I receive the error

  • Himalay
    linux bash scp
    I am trying to move uploaded file to another server using scp. following is the script i am using and error;”mv.sh”#!/bin/sh now=$(date +”%y-%m-%d-%M”)cd /var/www/uploadif [ -f /var/www/upload/* ];thenscp -P 88 * [email protected] /* */ :backup/STATUS=$?echo “$now-S1:succesful.” >> /var/log/mv_to.logelseecho “$now-S1:Error!!” >> /var/log/mv_to.logfierror;[: 13: /var/www/upload/1.doc: unexpected operatorIf there is only one file it works fine and if there are two or more files i

  • terdon
    linux ssh zip scp
    A .zip file was copied by scp command from a Linux server to another Linux server and the zip file got corrupted and showed the following message.”Unzipping the list file failed. Unexpected end of ZLIB input stream”Please tell me under what circumstances a .zip will get corrupted while travelling through the servers.

  • pghtech
    vmware-esxi virtual-machines virtual scp
    I have a ESXi 3.5 server that has 3 virtual machines on there that I cannot copy/download the virtual machine OR vmdk files from.I have tried the following options with their results:NOTE: all virtual machines shut down with no locks1) Under File -> Virtual Appliance -> Export Result: failed to export virtual appliance: expected FIle_data message. Got SESSION_COMPLETE2) Through Datastore, select individual vmdk files and attempt to “download” file. Result: failed to download file: expected FIle

  • srchulo
    ssh scp
    I am trying to scp a file from a server to my local machine, but it is giving me this error:protocol error: unexpected <newline>This is my syntax:scp user@server:/path/to/file .It did not work on this server, but then I tried the same command on my other server, so I can only assume that it is something wrong with my server and not the syntax of the scp command.Any ideas?

  • phocke
    vim ssh vimrc scp
    Hello my problem is this: I have an account at my hosting providers server and I can’t install my own copy of vim. So the only personalization I can make is editing .vimrc in my account, but it won’t sufficeWhat I’d Like to do is: on startup I’d like to unload all the plugins and loaded stuff, and tell vim to use other folder as its’ runtime.Any idea how to aproach it?

  • njozwiak
    python multithreading popen scp stderr
    I’m experiencing some strange behavior with my Python script exiting without any error messages. Based on my debugging it is happening around a popen() call to scp a file to a server.The code was (I was not the original author):logMessage(LEVEL_INFO, “copyto is ” + copyto) pid = Popen([“scp”, “-i”, “/root/.ssh/id_rsa”, “/usr/gpsw/gpslog” + self.node_addr, copyto], stdout=PIPE) __s = pid.communicate()[0] logMessage(LEVEL_INFO, “GPS log SCP complete”)In an attempt to debug I enhanced it to:logMess

  • Let_Me_Be
    scp freeze
    I have this strange issue. scp is hard locking my server.I have tried memcheck, tried downloading big files using wget, tried speed test in openssl and everything works just fine, yet every time I try to copy something (from or to the machine) using scp, it hard locks the machine.Not even sysrq magic key combos work.What could be the cause of this? I have no idea where to look.Edit: I just managed to crash the system using nfs server.

  • Dave
    linux ssh scp wifi
    As the title says, when I’m using wifi at my office, I’m able to copy files to and from my server using SCP, but for some reason SSH is non-responsive. It just hangs, doesn’t print anything, and I can’t ctrl-c to end it; I have to close the terminal window.When I’m plugged in on the LAN, everything works fine. Any ideas how to figure out what’s going on?

  • 8088
    linux ubuntu software-rec scp
    Are there any GUI clients for Ubuntu which can remotely connect to another Linux box over SCP?I heard about the fish:// protocol and Konqueror (which is for Kubuntu using KDE), but I am looking for a simple GUI SCP application for Ubuntu.

  • Eytan
    linux windows ssh scp shell-scripting
    I use the following scp syntax in order to transfer allot of files from Linux red-hat 5 to windows machine ( under Temp directory ), Remarks:SSH server already installed on windows machine I use this line in my shell scriptssshpass -p ‘$password’ /usr/bin/scp -o StrictHostKeyChecking=no $FILE [email protected]:’D:/Temp’on most cases files transferred successfullybut sometimes scp stuck during file transferring ? , in spite connectivity is ok like ping etcand I get the following error from

  • Rilindo
    ssh sftp scp winscp
    I am trying to connect to our remote server using winSCP. It was working before. But from today I am not able to connect to the server using SFTP. If I changed the protocol to SCP, then I am able to connect. Also I am able to connect using putty.Following is the winSCP log. (removed host details). 2011-11-07 20:18:54.593 Using SFTP protocol. . 2011-11-07 20:18:54.593 Doing startup conversation with host. > 2011-11-07 20:18:54.593 Type: SSH_FXP_INIT, Size: 5, Number: -1 . 2011-11-07 20:18:54.5

  • user28061
    ssh scp
    unfortunately ssh hangs up after login. Already uninstalled and installed it again. I can fix the issue temporary by erasing ~/.ssh and logoff and login on my system again.Here is my ssh -v dump:OpenSSH_5.8p1 Debian-7ubuntu1, OpenSSL 1.0.0e 6 Sep 2011 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to host [ip] port 22. debug1: Connection established. debug1: identity file /home/<user>/.ssh/id_rsa type -1 debug1: identity file /home/

  • oompahloompah
    ubuntu bash ssh cron scp
    I am trying to use scp in a bash script run by cron (I am running this on Ubuntu 10.0.4 LTS).The script works fine (i.e. transfers and copies file1 and file2 to/from the remote server, when I run it from the command line. However, when I run the script as a cron job, it fails.Th is is what the script looks like:#!/bin/bashcd /home/oompah/scripts/tests/ scp -P 12345 file1 [email protected]:~/uploadsif scp -P 12345 [email protected]:/path/to/file2.dat local.dat >&/dev/null ; then ec

  • 3dinfluence
    aix scp
    Have a situation where we have an application log sitting out on an AIX server. The log is being continually written to from the application, and we have users on Windows who want to view the file. What they’ve been doing is using WinSCP to transfer the file to their desktop and they open it using a text editor.What I think might be happening is scp is locking the file for the duration of the transfer, and the application ceases to be able to write to the file. The reason I believe this is th

  • oompahloompah
    ubuntu ssh cron scp
    I have the following bash script, which runs without problems at the CLI, but fails when run as a cron job.#!/bin/bashcd /home/oompah/scripts/tests/ scp -P 12345 file1 [email protected]:~/uploadsif scp -P 12345 [email protected]:/path/to/file2.dat local.dat >&/dev/null ; then echo “INFO: transfer OK” ; else echo “ERROR: transfer failed” ; fiThe error message I get (redirected to a log file) when I run it as a cron job is:ERROR: transfer failedThe error message I get in my mail i

  • Sina Sou
    bash tcl whitespace scp double-quotes
    I have two scripts to run in local computer shell The first script is a BASH shell which calls an expect script inside itself The bash shell is as followBASH SHELL SCRIPT SaveOnRemote.sh#!/bin/bash REMOTE_IP_ADDR=”192.168.100.67″ REMOTE_PASS=”some_pass_with_whitespaces” #The following line space is defined {\ } PC_EXEC_FILE=”/home/workspace/prog/Modified\ code/test/test_file”#The following line space is included in the variable TARGET_EXEC_FILE=”/sd/1/test/test file target dir/target_file”#

  • Yuvi
    c linux curl libcurl scp
    I am building curl with the following configuration :./configure –with-ssl –with-libssh2 –prefix=/home/yuvi/development/curlsshAfter configuration I can see that SCP is Enabled.curl version: 7.24.0Host setup: x86_64-unknown-linux-gnuInstall prefix: /home/yuvi/development/curlsshCompiler: gccSSL support: enabled (OpenSSL)SSH support: enabled (libSSH2)zlib support: enabledkrb4 support: no (–with-krb4*)GSSAPI support: no (–with-gssapi)SPNEGO support:

  • user788171
    c++ linux ssh streaming scp
    I have server 1 which is generating a large amount of data, e.g there are files that are constantly being updated, on the time scale of milliseconds.I would like to get these files onto another server, using C++ or standard Linux methods.Currently, I have been doing this by compressing the files every second and using scp to transfer them, and unpacking on the other server.However, the latency of this is very high and I can’t break sub 1 second times with this.Can anybody suggest the methods I c

  • Blair Conrad
    python automation scp
    I have a text file on my local machine that is generated by a python script run daily in cron. I would like to add a bit of code to have that file sent securely to my server over ssh. Help.

Web site is in building