Forum Discussion

tolinrome_13817's avatar
tolinrome_13817
Icon for Nimbostratus rankNimbostratus
May 23, 2014
Solved

using scp from F5 to copy file to remote location

I'm using scp to copy a file from the F5 to a remote location. When asked for the password it says: , permission denied, please try again. Of course the password is 100% correct. Why wont it let me copy the file to the remote server? Here is the script:

 

tmsh save /sys ucs ${SysName}_${Date}.ucs

 

${Delay:120}

 

scp /var/local/ucs/${SysName}_${Date}.ucs username@1.2.3.4:${SysName}_${Date}.ucs

 

password

 

When I do that it saves the file, then asks for the password.

 

5 Replies

  • [root@F5-NODE2:Standby:In Sync] ucs scp -v /var/local/ucs/${SysName}_${Date}.ucs user4@10.10.5.7:/tmp/${SysName}_${Date}.ucs Executing: program /usr/bin/ssh host 10.10.5.7, user user4, command scp -v -t /tmp/_.ucs OpenSSH_4.3p2, OpenSSL 0.9.8y 5 Feb 2013 debug1: Reading configuration data /config/ssh/ssh_config debug1: Applying options for * debug1: Connecting to 10.10.5.7 [10.10.5.7] port 22. debug1: Connection established. debug1: permanently_set_uid: 0/0 debug1: identity file /root/.ssh/identity type 1 debug1: identity file /root/.ssh/id_rsa type -1 debug1: identity file /root/.ssh/id_dsa type -1 debug1: loaded 3 keys debug1: Remote protocol version 2.0, remote software version WeOnlyDo 2.1.3 debug1: no match: WeOnlyDo 2.1.3 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.3 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: sending SSH2_MSG_KEXDH_INIT debug1: expecting SSH2_MSG_KEXDH_REPLY debug1: Host '10.10.5.7' is known and matches the RSA host key. debug1: Found key in /root/.ssh/known_hosts:2 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: password,publickey debug1: Next authentication method: publickey debug1: Offering public key: /root/.ssh/identity debug1: Server accepts key: pkalg ssh-rsa blen 149 debug1: read PEM private key done: type RSA debug1: Authentications that can continue: password,publickey debug1: Trying private key: /root/.ssh/id_rsa debug1: Trying private key: /root/.ssh/id_dsa debug1: Next authentication method: password user4@10.10.5.7's password: debug1: Authentications that can continue: password,publickey Permission denied, please try again. user4@10.10.5.7's password: debug1: Authentications that can continue: password,publickey Permission denied, please try again. user4@10.10.5.7's password: Received disconnect from 10.10.5.7: 2: Too many attempts. lost connection [root@F5-NODE2:Standby:In Sync] ucs

     

  • Can you SSH to the remote server from the same device? Just wondering if it's a special character in the password? Is the remote server running a different OS?

     

  • Create a identity key on the remote server and use the -B swith to prevent asking for passwords or passphrase. First do a ssh to the server to save the ssh-key and then use scp with:

     

    scp -B -i @:/

     

    • jurgenvdmark_14's avatar
      jurgenvdmark_14
      Icon for Nimbostratus rankNimbostratus
      For some reason my answer was transformed in Special characters. Use scp with -B and -i which points to the identity file