Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Secure-Shell
[Top] [All Lists]

sftp works - but scp fails

Subject: sftp works - but scp fails
Date: Tue, 15 Mar 2005 16:59:44 -0600
I have a Mandrake system that I use to connect to one of my customers. I
generated keys using "ssh-keygen -t dsa" on my mandrake box. I then
sftp'd into my customer's and transferred the id_dsa.pub file renaming
it authorized_keys. I then exited out and retried the sftp. Everything
works great. I get in immediately without being asked any passwords.
When I try to use "scp" to transfer a file into my customer's machine,
it always asks me for the password for the use on the customer's
machine. After entering the password, I'm in. But I would like to
execute the scp command from a script without being asked to enter
anything.

Why does sftp get in and scp does not? Here is the output of a "scp
-vvv" command into the customer's machine:

Executing: program /usr/bin/ssh host sftp.example.com, user XXXXX,
command scp -v -t spool
OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x0090703f
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Rhosts Authentication disabled, originating port will not be
trusted.
debug2: ssh_connect: needpriv 0
debug1: Connecting to sftp.example.com [XXX.XXX.XXX.XXX] port 22.
debug1: Connection established.
debug1: identity file /home/XXXXX/.ssh/identity type -1
debug1: identity file /home/XXXXX/.ssh/id_rsa type -1
debug3: Not a RSA1 key file /home/XXXXX/.ssh/id_dsa.
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug3: key_read: missing keytype
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug3: key_read: missing whitespace
debug2: key_type_from_name: unknown key type '-----END'
debug3: key_read: missing keytype
debug1: identity file /home/XXXXX/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version
OpenSSH_3.5p1
debug1: match: OpenSSH_3.5p1 pat OpenSSH*
debug1: Local version string SSH-1.5-OpenSSH_3.6.1p2
debug1: Waiting for server public key.
debug1: Received server public key (768 bits) and host key (1024 bits).
debug3: check_host_in_hostfile: filename /home/XXXXX/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 2
debug3: check_host_in_hostfile: filename /home/XXXXX/.ssh/known_hosts
debug3: check_host_in_hostfile: match line 2
debug1: Host 'sftp.example.com' is known and matches the RSA1 host key.
debug1: Found key in /home/XXXXX/.ssh/known_hosts:2
debug1: Encryption type: 3des
debug1: Sent encrypted session key.
debug2: cipher_init: set keylen (16 -> 32)
debug2: cipher_init: set keylen (16 -> 32)
debug1: Installing crc compensation attack detector.
debug1: Received encrypted confirmation.
debug1: Doing password authentication.
XXXXX@sftp.example.com's password:
------------------------------------------------------------------------
---


Mark Wold
Fax Innovations
17 South Main St.
Elburn, IL 60119
P: 800.432.9123
F: 630.365.6904
E: mark (at) faxinnovations.com
W: http://www.faxinnovations.com



<Prev in Thread] Current Thread [Next in Thread>