Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OpenSSH 4.1

Status
Not open for further replies.

teqmem

Programmer
Nov 26, 2004
114
US
I apologize if posted this on the wrong forum but I'm testing on AIX.

I now run OpenSSH 3.9P1 on all our servers. I use the command 'sftp -b' with expect scripts to transfer files among the servers in the background. With OpenSSH 3.9P1, I don't have any problems.

I noticed that new versions of OpenSSH and OpenSSL just became available. I downloaded and installed but I'm running into a problem that hopefully you can help me.

When I run 'sftp' without the '-b', I can connect to a remote host. When I run 'sftp' with '-b', I receive a 'Permission Denied' error. 'password' is listed but it doesn't seem to try it. Any ideas? Thanks.



Here's a screen capture. First, I show that I have a script file, then run without the -b successfully, then run with -b.

$ cat t.sftp
cd /tmp
pwd
$
$ sftp dev
Connecting to dev...
cicweb@dev's password:
sftp> pwd
Remote working directory: /home/cicweb
sftp> quit
$
$ sftp -v -b t.sftp dev
OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to dev [w.x.y.z] port 22.
debug1: Connection established.
debug1: identity file /home/cicweb/.ssh/id_rsa type -1
debug1: identity file /home/cicweb/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_4.1
debug1: match: OpenSSH_4.1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.1
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(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'dev' is known and matches the RSA host key.
debug1: Found key in /home/cicweb/.ssh/known_hosts:1
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: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/cicweb/.ssh/id_rsa
debug1: Trying private key: /home/cicweb/.ssh/id_dsa
debug1: No more authentication methods to try.
Permission denied (publickey,password,keyboard-interactive).
Connection closed
$
 
Since batch mode isn't meant to be an interactive mode, it could be that password authentication has been disabled for the -b prompt.

I'd suggest either moving to a non interactive (key based) authentication or moving the batch script commands into your expect script.



Rod Knowlton
IBM Certified Advanced Technical Expert pSeries and AIX 5L
CompTIA Linux+
CompTIA Security+

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top