login about faq

I already generated my keys and uploaded them to the server. I'm then able to connect by sftp and transfer files without password, but when i try to automate by script and use scp it does not transfer any files.

This is the log:

$ scp  -v -P 269 -i /psdb/.ssh/id_rsa psdb/utilerias/prueba.txt Ftepc@
Executing: program /usr/bin/ssh host, user Ftepc, command scp -v -t /sites/tepc/site/live/ftp
Sun_SSH_1.1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090700f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Rhosts Authentication disabled, originating port will not be trusted.
debug1: ssh_connect: needpriv 0
debug1: Connecting to [] port 269.
debug1: Connection established.
debug1: identity file /psdb/.ssh/id_rsa type 1
debug1: Remote protocol version 2.0, remote software version SSH Tectia Server
debug1: no match: SSH Tectia Server
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-Sun_SSH_1.1.1
debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible mech_dh: Invalid or unknown error)
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: Peer sent proposed langtags, ctos:
debug1: Peer sent proposed langtags, stoc:
debug1: We proposed langtags, ctos: i-default
debug1: We proposed langtags, stoc: i-default
debug1: dh_gen_key: priv key bits set: 118/256
debug1: bits set: 501/1024
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host '' is known and matches the RSA host key.
debug1: Found key in /psdb/.ssh/known_hosts:4
debug1: bits set: 510/1024
debug1: ssh_rsa_verify: signature correct
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: Authentications that can continue: gssapi-with-mic,password,publickey,keyboard-interactive
debug1: Next authentication method: gssapi-with-mic
debug1: Failed to acquire GSS-API credentials for any mechanisms (No credentials were supplied, or the credentials were unavailable or inaccessible mech_dh: Invalid or unknown error)
debug1: Next authentication method: publickey
debug1: Trying public key: /psdb/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149 lastkey 115de0 hint 0
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey)
debug1: fd 5 setting O_NONBLOCK
debug1: fd 6 setting O_NONBLOCK
debug1: channel 0: new [client-session]
debug1: send channel open 0
debug1: Entering interactive session.
debug1: ssh_session2_setup: id 0
debug1: Sending command: scp -v -t /sites/tepc/site/live/ftp
debug1: channel request 0: exec
debug1: channel 0: open confirm rwindow 65536 rmax 32768
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: rcvd eof
debug1: channel 0: output open -> drain
debug1: channel 0: obuf empty
debug1: channel 0: close_write
debug1: channel 0: output drain -> closed
debug1: channel 0: rcvd close
debug1: channel 0: close_read
debug1: channel 0: input open -> closed
debug1: channel 0: almost dead
debug1: channel 0: gc: notify user
debug1: channel 0: gc: user detached
debug1: channel 0: send close
debug1: channel 0: is dead
debug1: channel 0: garbage collecting
debug1: channel_free: channel 0: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 1
lost connection

asked Jun 15 '11 at 20:20

chidonet's gravatar image


edited Jun 15 '11 at 23:47

Roman's gravatar image

Roman ♦♦

Hi, have you seen the log on the server side? Any errors there?

(Jun 15 '11 at 20:34) Roman ♦♦ Roman's gravatar image

mmm I dont haver access to the log on server side... I already automate the transfer with script using sftp... but I want to use scp.

(Jun 15 '11 at 20:49) chidonet chidonet's gravatar image

This could be due to the configuration on the server side, if the server is configured to only accept file transfer connections.

The reason sftp works and scp doesn't might be due to the fact that, in OpenSSH, the sftp command line tool uses the SFT protocol to transfer files while the scp command line tool uses the secure copy protocol which is more akin to running ssh commands. Tectia's scp tool (scpg3) actually uses the SFT protocol. For this reason OpenSSH scp might not work against a server that is configured to allow only SFT file transfers. Are you able to make terminal connections (ssh) to the server? If not, most likely the server is configured to only allow SFTP.

In order to troubleshoot this further we would probably need access to the server configuration and see if it is configured to allow scp file transfers.

Also, is there a particular reason you would prefer to use scp rather than sftp?


answered Jun 15 '11 at 23:45

Roman's gravatar image

Roman ♦♦

Roman A lot of thanks for you answer.. it seem that the server only allow sftp. Regards from Gto. Mexico.

(Jun 16 '11 at 02:24) chidonet chidonet's gravatar image

@chidonet No hay problema. Saludos de un compatriota.

(Jun 16 '11 at 16:00) Roman ♦♦ Roman's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Jun 15 '11 at 20:20

Seen: 21,346 times

Last updated: Jun 16 '11 at 16:00

All user contributed content licensed under the cc-by-sa license.
Powered by OSQA.