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