[Ssh-sftp-perl-users] Host vs Hostname in SFTP
Brought to you by:
dbrobins
|
From: Serguei M. <smo...@be...> - 2004-05-28 20:36:11
|
Hi Experts,
Am I doing something wrong? It looks like Net::SFTP does not recognize Host
from ~/.ssh/config file.
Should I always do something like this?
$sftp = Net::SFTP->new('ctsapu001',(debug => 1, user => 'ace_event'));
Thank you,
Sergei
=================================================
Entry for ACE1 in ~/.ssh/config file
=================================================
###########################
Host ACE1
protocol 2
User ace_event
Hostname ctsapu001
IdentityFile ~/.ssh/id_dsa
ForwardX11 no
BatchMode yes
###########################
=================================================
$sftp = Net::SFTP->new('ACE1',debug => 1);
=================================================
cdvapu001: Reading configuration data /export/home/ace_event/.ssh/config
cdvapu001: Reading configuration data /etc/ssh_config
Net::SSH: Bad host name: ACE1 at
/opt/fs_autosys/lib/perl/lib/site_perl/5.6.1/Net/SFTP.pm line 36
=================================================
ace_event@cdvapu001> ssh -v ACE1
=================================================
OpenSSH_2.9p2, SSH protocols 1.5/2.0, OpenSSL 0x0090602f
debug1: Reading configuration data /export/home/ace_event/.ssh/config
debug1: Applying options for ACE1
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Seeded RNG with 46 bytes from programs
debug1: Seeded RNG with 3 bytes from system calls
debug1: Rhosts Authentication disabled, originating port will not be
trusted.
debug1: restore_uid
debug1: ssh_connect: getuid 2051 geteuid 2051 anon 1
debug1: Connecting to ctsapu001 [198.162.245.52] port 22.
debug1: temporarily_use_uid: 2051/1008 (e=2051)
debug1: restore_uid
debug1: temporarily_use_uid: 2051/1008 (e=2051)
debug1: restore_uid
debug1: Connection established.
debug1: identity file /export/home/ace_event/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_2.9p2
debug1: match: OpenSSH_2.9p2 pat ^OpenSSH
Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_2.9p2
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: SSH2_MSG_KEX_DH_GEX_REQUEST sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: dh_gen_key: priv key bits set: 130/256
debug1: bits set: 1034/2049
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'ctsapu001' is known and matches the RSA host key.
debug1: Found key in /export/home/ace_event/.ssh/known_hosts2:1
debug1: bits set: 1032/2049
debug1: ssh_rsa_verify: signature correct
debug1: kex_derive_keys
debug1: newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: waiting for SSH2_MSG_NEWKEYS
debug1: newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: done: ssh_kex2.
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: service_accept: ssh-userauth
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: authentications that can continue:
publickey,password,keyboard-interactive
debug1: next auth method to try is publickey
debug1: try pubkey: /export/home/ace_event/.ssh/id_dsa
debug1: input_userauth_pk_ok: pkalg ssh-dss blen 434 lastkey 1022c8 hint 0
debug1: read PEM private key done: type DSA
debug1: sig size 20 20
debug1: ssh-userauth2 successful: method publickey
debug1: channel 0: new [client-session]
debug1: channel_new: 0
debug1: send channel open 0
debug1: Entering interactive session.
debug1: client_init id 0 arg 0
debug1: channel request 0: shell
debug1: channel 0: open confirm rwindow 0 rmax 16384
Last login: Fri May 28 10:45:58 2004 from cdvapu001.futur
Sun Microsystems Inc. SunOS 5.8 Generic February 2000
You have new mail.
ace_event@ctsapu001>
|