Hi,

 

Further to the problem where libssh2 exec does not work after an sftp
session.

 

I have attached the 2 programs. The working version has been created
from the non-working

version by commenting out the sftp session stuff.

 

I am using Redhat Linux.

 

Thanks again for any help.

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

This is the output:

1. Working

$ ./run_exectest

Fingerprint: C4 45 90 90 9B EA 59 0A 72 A7 92 28 0D E2 5E 68 

Authentication methods: publickey,gssapi-with-mic,password

        Authentication by public key succeeded.

Received Thu Jun 11 11:25:14 EST 2009

Read timed out

 

 

Your exit status is 0

all done!

 

2. Not working

$ ./run_exectest  

Fingerprint: C4 45 90 90 9B EA 59 0A 72 A7 92 28 0D E2 5E 68 

Authentication methods: publickey,gssapi-with-mic,password

        Authentication by public key succeeded.

Read timed out

 

Channel close wait from remote returned -1

 

Your exit status is 0

all done!

 

I have run sshd -ddd and the output is as below:

/usr/sbin/sshd -ddd

debug2: load_server_config: filename /etc/ssh/sshd_config

debug2: load_server_config: done config len = 321

debug2: parse_server_config: config /etc/ssh/sshd_config len 321

debug1: sshd version OpenSSH_3.9p1

debug1: private host key: #0 type 0 RSA1

debug3: Not a RSA1 key file /etc/ssh/ssh_host_rsa_key.

debug1: read PEM private key done: type RSA

debug1: private host key: #1 type 1 RSA

debug3: Not a RSA1 key file /etc/ssh/ssh_host_dsa_key.

debug1: read PEM private key done: type DSA

debug1: private host key: #2 type 2 DSA

debug1: rexec_argv[0]='/usr/sbin/sshd'

debug1: rexec_argv[1]='-ddd'

debug2: fd 3 setting O_NONBLOCK

debug1: Bind to port 22 on 0.0.0.0.

Server listening on 0.0.0.0 port 22.

socket: Address family not supported by protocol

Generating 768 bit RSA key.

RSA key generation complete.

debug3: fd 4 is not O_NONBLOCK

debug1: Server will not fork when running in debugging mode.

debug3: send_rexec_state: entering fd = 7 config len 321

debug3: ssh_msg_send: type 0

debug3: send_rexec_state: done

debug1: rexec start in 4 out 4 newsock 4 pipe -1 sock 7

 

$ ./run_exectest

Fingerprint: C4 45 90 90 9B EA 59 0A 72 A7 92 28 0D E2 5E 68 

Authentication methods: publickey,gssapi-with-mic,password

        Authentication by public key succeeded.

Received Environment:

  USER=pwu

  LOGNAME=pwu

  HOME=/home/pwu

  PATH=/usr/local/bin:/bin:/usr/bin

  MAIL=/var/mail/pwu

  SHELL=/bin/ksh

  SSH_CLIENT=10.3.2.37 33243 22

  SSH_CONNECTION=10.3.2.37 33243 10.3.2.37 22

  SSH_TTY=/dev/pts/2

  TERM=vanilla

Thu Jun 11 11:52:46 EST 2009

Read timed out

 

 

Your exit status is 0

all done!

 

 

 

 

 


***************************************************************
This message is intended for the addressee named and may contain confidential 
information. If you are not the intended recipient, please delete it and notify 
the sender. Views expressed in this message are those of the individual sender, 
and are not necessarily the views of the Department of  Lands. This email 
message has been swept by MIMEsweeper for the presence of computer viruses.
***************************************************************
Please consider the environment before printing this email.

Attachment: exectest.c.working
Description: exectest.c.working

Attachment: exectest.c.nonworking
Description: exectest.c.nonworking

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to