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]

RE: problem with sftp

Subject: RE: problem with sftp
Date: Tue, 30 Aug 2005 11:38:48 -0700
Hi,
 

Sorry about the formatting of my previous e-mail, I am resending with
more information in
Text format this time.

I am having problem with sftp(client running on windows and server
running on solaris), although ssh works properly. I Cannot figure out
anything.
 
File transfer could not be started or it exited suddenly
Exit value 0 was returned. Most likely the sftp-server is not in the
path of the user on the server-side
 
sftp-server is in the path, and also in the configuration file,
/usr/local/etc/sshd_config
 
I have checked the .profile and it does not have any echo statement or
any program giving output.
 
Version on windows(windows has ssh/sftp client only)
-----------
Version 3.2.1(Build 267)
 
Version on solaris
-----------
OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005


The following output is from sftp session connecting from one solaris
box to another solaris box.

Debug output of sftp -v  when trying to connect as user root

bash-2.03# sftp -v cnc-07
Connecting to cnc-07...
OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to cnc-07 [172.21.54.157] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.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
The authenticity of host 'cnc-07 (172.21.54.157)' can't be established.
RSA key fingerprint is 9c:87:e4:64:a8:be:84:c5:b0:79:51:33:d6:16:e0:d5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'cnc-07,172.21.54.157' (RSA) to the list of
known hosts.
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: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: password
root@cnc-07's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 137
Connection closed
bash-2.03# 

======================================

Output of sftp -v when trying to connect as user pmandal

bash-2.03# sftp -v pmandal@cnc-07
Connecting to cnc-07...
OpenSSH_4.1p1, OpenSSL 0.9.7g 11 Apr 2005
debug1: Reading configuration data /usr/local/etc/ssh_config
debug1: Connecting to cnc-07 [172.21.54.157] port 22.
debug1: Connection established.
debug1: permanently_set_uid: 0/1
debug1: identity file /.ssh/id_rsa type -1
debug1: identity file /.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 'cnc-07' is known and matches the RSA host key.
debug1: Found key in /.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: /.ssh/id_rsa
debug1: Trying private key: /.ssh/id_dsa
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue:
publickey,password,keyboard-interactive
debug1: Next authentication method: password
pmandal@cnc-07's password: 
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending subsystem: sftp
debug1: client_input_channel_req: channel 0 rtype exit-signal reply 0
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status -1
Connection closed
bash-2.03# 


Debug output from ssh/sftp session from windows machine to ssh server
running on solaris

SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
winConfigStorage/ConfigStorage.cpp:185: FindValue(Connection,
Encryption): failed winConfigStorage/ConfigStorage.cpp:185:
FindValue(Connection, Encryption): failed
winConfigStorage/ConfigStorage.cpp:185: FindValue(Connection, MAC):
failed winConfigStorage/ConfigStorage.cpp:185: FindValue(Connection,
MAC): failed winConfigStorage/ConfigStorage.cpp:185:
FindValue(Connection, Compression): failed
winConfigStorage/ConfigStorage.cpp:185: FindValue(Connection,
Compression): failed winMainFrame/MainFrm.cpp:97: constructor, frames 2
term_create term_create about to call emulator_create
term_register_callbacks term_protocol_resize (80x24)
term_register_callbacks returning. emulator_create returned.
winView/SshTermEmulView.cpp:400: lines 500 SshLicense/sshlicense.c:175:
204 bytes (9 pairs) of attributes found. SshLicense/sshlicense.c:175:
204 bytes (9 pairs) of attributes found.
winView/SshTermEmulView.cpp:727: ResizeFrameWindow (80, 24)
winView/SshTermEmulView.cpp:230: ~CSshTermEmulView term_destroy: calling
emulator_destroy term_deregister term_destroy: emulator_destroy called
winMainFrame/MainFrm.cpp:110: destructor, frames 1
SshLicense/sshlicense.c:175: 204 bytes (9 pairs) of attributes found.
SshLicense/sshlicense.c:175: 204 bytes (9 pairs) of attributes found.
winProtClient/SshProtocolClient.cpp:245: constructor
winProtClient/SshProtocolClient.cpp:335: Connect()
winProtClient/SshProtocolClient.cpp:842: CBConnectDone
winProtClient/SshProtocolClient.cpp:899: Agent forwarding requested = 0
Ssh2Transport/trcommon.c:2522: Allocating cipher: name: none, key_len:
16. Ssh2Transport/trcommon.c:2522: Allocating cipher: name: none,
key_len: 16. client supports 3 auth methods:
'publickey,keyboard-interactive,password' Ssh2Common/sshcommon.c:530:
local ip = 171.69.218.225, local port = 2360 Ssh2Common/sshcommon.c:532:
remote ip = 172.21.54.157, remote port = 22
SshConnection/sshconn.c:1945: Wrapping... Remote version:
SSH-1.99-OpenSSH_4.1 winProtClient/SshProtocolClient.cpp:471:
CBVersionCheck: remote version 'SSH-1.99-OpenSSH_4.1'

 OpenSSH: Major: 4 Minor: 1 Revision: 0 Ssh2Transport/trcommon.c:1518:
All versions of OpenSSH handle kex guesses incorrectly.
Ssh2Transport/trcommon.c:1714: Computing algorithms from key exchange.
Ssh2Transport/trcommon.c:1901: lang s to c: `', lang c to s: `'
Ssh2Transport/trcommon.c:1967: c_to_s: cipher aes128-cbc, mac hmac-md5,
compression none Ssh2Transport/trcommon.c:1970: s_to_c: cipher
aes128-cbc, mac hmac-md5, compression none SshProtoTrKex/trkex.c:481:
Making first key exchange packet. winProtHostKey/ProtHostKey.cpp:146:
CBKeyCheck SshWinuser/sshwinuser.c:208: ssh_user_initialize()
Ssh2Transport/trcommon.c:2522: Allocating cipher: name: aes128-cbc,
key_len: 16. Ssh2Transport/trcommon.c:2522: Allocating cipher: name:
aes128-cbc, key_len: 16. Ssh2Common/sshcommon.c:331: Received
SSH_CROSS_STARTUP packet from connection protocol.
Ssh2Common/sshcommon.c:381: Received SSH_CROSS_ALGORITHMS packet from
connection protocol. server offers auth methods
'publickey,password,keyboard-interactive'.
Ssh2AuthPubKeyClient/authc-pubkey.c:1475:
ssh_client_auth_pubkey_agent_list_complete err 0 num 0
Ssh2AuthClient/sshauthc.c:319: Method 'publickey' disabled. server
offers auth methods 'publickey,password,keyboard-interactive'. server
offers auth methods 'publickey,password,keyboard-interactive'.
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
Ssh2Common/sshcommon.c:299: Received SSH_CROSS_AUTHENTICATED packet from
connection protocol. winProtClient/SshProtocolClient.cpp:702:
CBAuthenticated(result 1) winStream/EmulStream.cpp:52:
CSshProtocolStream Ssh2Common/sshcommon.c:840: num_channels now 1
winProtClient/SshProtocolClient.cpp:570: CBSessionUp(success = 1)
winView/SshTermEmulView.cpp:2950: CBSessionUp() term_receive_resize:
80x24 term_protocol_resize (80x24)
winProtClient/SshProtocolClient.cpp:1089: SetWindowSize 80,24
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
winMainFrame/MainFrm.cpp:97: constructor, frames 2
winStream/EmulStream.cpp:52: CSshProtocolStream
Ssh2Common/sshcommon.c:840: num_channels now 2
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
winProtClient/SshProtocolClient.cpp:570: CBSessionUp(success = 1)
winFileTree/FileTree.cpp:908: CBFileTransferSessionUp()
Ssh2ChannelSession/sshchsession.c:1947: bad data
Ssh2Common/sshcommon.c:807: num_channels now 1
winProtClient/SshProtocolClient.cpp:581: CBSessionClose(stat = 0)
winFileTree/FileTree.cpp:967: CBFileTransferSessionClose(exit 0)
winProtClient/SshProtocolClient.cpp:610: CBSessionClose() num_channels
!= 0, not destroying protocol SshStreamLocal/sshwinlocalstream.c:239:
Mutex `SSH_LS_MUTEX(SSH Accession)' does not exist
SshStreamLocal/sshwinlocalstream.c:1192: Could not open mutex of the
local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
winProtClient/SshProtocolClient.cpp:1777: CBDestroyBogusStream
winStream/EmulStream.cpp:66: ~CSshProtocolStream
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession
SshStreamLocal/sshwinlocalstream.c:239: Mutex `SSH_LS_MUTEX(SSH
Accession)' does not exist SshStreamLocal/sshwinlocalstream.c:1192:
Could not open mutex of the local stream listener `SSH Accession'
SshGafpClientInterface/gafpclient.c:1870: connection failed
SshEKAcc/sshaccprovider.c:915: Could not connect to Accession 

 
thanks
Pankaj
 
 

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