Connection has been unexpectedly closed

Advertisement

mmarinschek
Joined:
Posts:
2
Location:
http://www.irian.at

Connection has been unexpectedly closed

Hi *,

I am getting a problem with using Sudosh and WinSCP (sudosh is a wrapper for the bash-shell which enables logging of commands). As soon as I enable sudosh on the server, it won't work anymore. As I understand it, WinSCP builds on putty, pscp - and using pscp, it works. See below how I call pscp (the parameters are replaced by ant on running the command ;))...
pscp -scp -pw ${p-www-password} ${file-name} ${p-www-user}@${p-server}:${server-target-dir}/${uploaded-file-name}
Find further down below my logging output from trying to connect with WinSCP...

thanks,

regards,

Martin
. 2006-01-12 15:48:10.375 --------------------------------------------------------------------------
. 2006-01-12 15:48:10.375 WinSCP Version 3.8.0 (Build 312) (OS 5.0.2195 Service Pack 4)
. 2006-01-12 15:48:10.375 Login time: Donnerstag, 12. Jänner  2006 15:48:10
. 2006-01-12 15:48:10.375 --------------------------------------------------------------------------
. 2006-01-12 15:48:10.375 Session name: www@intratest
. 2006-01-12 15:48:10.375 Host name: intratest (Port: 22)
. 2006-01-12 15:48:10.375 User name: www (Password: Yes, Key file: No)
. 2006-01-12 15:48:10.375 Transfer Protocol: SFTP (SCP)
. 2006-01-12 15:48:10.375 SSH protocol version: 2; Compression: No
. 2006-01-12 15:48:10.375 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2006-01-12 15:48:10.375 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2006-01-12 15:48:10.375 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2006-01-12 15:48:10.375 SSH Bugs: -,-,-,-,-,-,-,-
. 2006-01-12 15:48:10.375 SFTP Bugs: -,-,-
. 2006-01-12 15:48:10.375 Proxy: none
. 2006-01-12 15:48:10.375 Return code variable: Autodetect; Lookup user groups: Yes
. 2006-01-12 15:48:10.375 Shell: default, EOL: 0
. 2006-01-12 15:48:10.375 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2006-01-12 15:48:10.375 Cache directory changes: Yes, Permanent: Yes
. 2006-01-12 15:48:10.375 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2006-01-12 15:48:10.375 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2006-01-12 15:48:10.375 --------------------------------------------------------------------------
. 2006-01-12 15:48:10.375 Looking up host "intratest"
. 2006-01-12 15:48:10.375 Connecting to 143.245.22.108 port 22
. 2006-01-12 15:48:10.390 Server version: SSH-2.0-OpenSSH_3.9p1
. 2006-01-12 15:48:10.390 We claim version: SSH-2.0-WinSCP_release_3.8
. 2006-01-12 15:48:10.390 Using SSH protocol version 2
. 2006-01-12 15:48:10.390 Doing Diffie-Hellman group exchange
. 2006-01-12 15:48:10.437 Doing Diffie-Hellman key exchange
. 2006-01-12 15:48:10.750 Host key fingerprint is:
. 2006-01-12 15:48:10.750 ssh-rsa 1024 5c:55:8f:0c:9a:4b:0f:3a:89:e2:a4:dc:4d:66:10:c3
. 2006-01-12 15:48:10.750 Initialised AES-256 client->server encryption
. 2006-01-12 15:48:10.750 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-01-12 15:48:10.750 Initialised AES-256 server->client encryption
. 2006-01-12 15:48:10.750 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-01-12 15:48:10.781 Using username "www".
. 2006-01-12 15:48:10.781 Pageant is running. Requesting keys.
. 2006-01-12 15:48:10.781 Pageant has 1 SSH-2 keys
. 2006-01-12 15:48:10.781 Trying Pageant key #0
. 2006-01-12 15:48:10.796 Remote debug message: Adding to environment: REMOTE_USER=exmam
! 2006-01-12 15:48:10.937 Authenticating with public key "rsa-key-exmam" from agent.
. 2006-01-12 15:48:11.078 Sending Pageant's response
. 2006-01-12 15:48:11.078 Remote debug message: Adding to environment: REMOTE_USER=exmam
. 2006-01-12 15:48:11.265 Access granted
. 2006-01-12 15:48:11.328 Opened channel for session
. 2006-01-12 15:48:11.453 Primary command failed; attempting fallback
. 2006-01-12 15:48:26.453 Waiting for data timed out, asking user what to do.
. 2006-01-12 15:48:26.453 Asking user:
. 2006-01-12 15:48:26.453 Host has not answered for 15 seconds.
. 2006-01-12 15:48:26.453 
. 2006-01-12 15:48:26.453 Wait for another 15 seconds? Pressing 'Abort' button will close session. ()
. 2006-01-12 15:48:28.031 Attempt to close connection due to fatal exception:
* 2006-01-12 15:48:28.031 Terminated by user.
. 2006-01-12 15:48:28.031 Closing connection.
* 2006-01-12 15:48:28.031 (ESshFatal) Authentication failed.
* 2006-01-12 15:48:28.031 Authentication log (see session log for details):
* 2006-01-12 15:48:28.031 Using username "www".
* 2006-01-12 15:48:28.031 Authenticating with public key "rsa-key-exmam" from agent.
* 2006-01-12 15:48:28.031 
* 2006-01-12 15:48:28.031 Terminated by user.
. 2006-01-12 15:50:50.546 --------------------------------------------------------------------------
. 2006-01-12 15:50:50.546 WinSCP Version 3.8.0 (Build 312) (OS 5.0.2195 Service Pack 4)
. 2006-01-12 15:50:50.546 Login time: Donnerstag, 12. Jänner 2006 15:50:50
. 2006-01-12 15:50:50.546 --------------------------------------------------------------------------
. 2006-01-12 15:50:50.546 Session name: www@intratest
. 2006-01-12 15:50:50.546 Host name: intratest (Port: 22)
. 2006-01-12 15:50:50.546 User name: www (Password: Yes, Key file: No)
. 2006-01-12 15:50:50.546 Transfer Protocol: SFTP (SCP)
. 2006-01-12 15:50:50.546 SSH protocol version: 2; Compression: No
. 2006-01-12 15:50:50.546 Agent forwarding: No; TIS/CryptoCard: No; KI: Yes; GSSAPI: No
. 2006-01-12 15:50:50.546 Ciphers: aes,blowfish,3des,WARN,des; Ssh2DES: No
. 2006-01-12 15:50:50.546 Ping type: -, Ping interval: 30 sec; Timeout: 15 sec
. 2006-01-12 15:50:50.546 SSH Bugs: -,-,-,-,-,-,-,-
. 2006-01-12 15:50:50.546 SFTP Bugs: -,-,-
. 2006-01-12 15:50:50.546 Proxy: none
. 2006-01-12 15:50:50.546 Return code variable: Autodetect; Lookup user groups: Yes
. 2006-01-12 15:50:50.546 Shell: default, EOL: 0
. 2006-01-12 15:50:50.546 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2006-01-12 15:50:50.546 Cache directory changes: Yes, Permanent: Yes
. 2006-01-12 15:50:50.546 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2006-01-12 15:50:50.546 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2006-01-12 15:50:50.546 --------------------------------------------------------------------------
. 2006-01-12 15:50:50.546 Looking up host "intratest"
. 2006-01-12 15:50:50.546 Connecting to 143.245.22.108 port 22
. 2006-01-12 15:50:50.562 Server version: SSH-2.0-OpenSSH_3.9p1
. 2006-01-12 15:50:50.562 We claim version: SSH-2.0-WinSCP_release_3.8
. 2006-01-12 15:50:50.562 Using SSH protocol version 2
. 2006-01-12 15:50:50.562 Doing Diffie-Hellman group exchange
. 2006-01-12 15:50:50.609 Doing Diffie-Hellman key exchange
. 2006-01-12 15:50:50.984 Host key fingerprint is:
. 2006-01-12 15:50:50.984 ssh-rsa 1024 5c:55:8f:0c:9a:4b:0f:3a:89:e2:a4:dc:4d:66:10:c3
. 2006-01-12 15:50:50.984 Initialised AES-256 client->server encryption
. 2006-01-12 15:50:50.984 Initialised HMAC-SHA1 client->server MAC algorithm
. 2006-01-12 15:50:50.984 Initialised AES-256 server->client encryption
. 2006-01-12 15:50:50.984 Initialised HMAC-SHA1 server->client MAC algorithm
! 2006-01-12 15:50:51.031 Using username "www".
. 2006-01-12 15:50:51.031 Pageant is running. Requesting keys.
. 2006-01-12 15:50:51.031 Pageant has 1 SSH-2 keys
. 2006-01-12 15:50:51.031 Trying Pageant key #0
. 2006-01-12 15:50:51.046 Remote debug message: Adding to environment: REMOTE_USER=exmam
! 2006-01-12 15:50:51.171 Authenticating with public key "rsa-key-exmam" from agent.
. 2006-01-12 15:50:51.328 Sending Pageant's response
. 2006-01-12 15:50:51.328 Remote debug message: Adding to environment: REMOTE_USER=exmam
. 2006-01-12 15:50:51.500 Access granted
. 2006-01-12 15:50:51.578 Opened channel for session
. 2006-01-12 15:50:51.703 Primary command failed; attempting fallback
. 2006-01-12 15:50:51.843 Started a shell/command
. 2006-01-12 15:50:51.843 --------------------------------------------------------------------------
. 2006-01-12 15:50:51.843 Using SCP protocol.
. 2006-01-12 15:50:51.843 Doing startup conversation with host.
. 2006-01-12 15:50:51.843 Skipping host startup message (if any).
> 2006-01-12 15:50:51.843 echo "WinSCP: this is end-of-file:0"
! 2006-01-12 15:50:51.843 -sudosh: couldn't get your controlling terminal.
. 2006-01-12 15:50:51.968 Server sent command exit status 1
. 2006-01-12 15:50:51.968 All channels closed. Disconnecting
. 2006-01-12 15:50:51.968 Server closed network connection
* 2006-01-12 15:50:52.000 (ESshFatal) Error skipping startup message. Your shell is probably incompatible with the application (BASH is recommended).
* 2006-01-12 15:50:52.000 Connection has been unexpectedly closed. Server sent command exit status 1.

Reply with quote

Advertisement

mmarinschek
Joined:
Posts:
2
Location:
http://www.irian.at

Yes

I have checked the documentation first, I do know that SCP and SFTP have different feature sets. Actually, we've tried both SCP and SFTP with the sudosh and WinSCP, and both didn't work.

It must be the following two lines which are the problem:

> 2006-01-12 15:50:51.843 echo "WinSCP: this is end-of-file:0"
! 2006-01-12 15:50:51.843 -sudosh: couldn't get your controlling terminal.

Does that mean WinSCP will never work with sudosh?

regards,

Martin

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,476
Location:
Prague, Czechia

Re: Yes

mmarinschek wrote:

I have checked the documentation first, I do know that SCP and SFTP have different feature sets. Actually, we've tried both SCP and SFTP with the sudosh and WinSCP, and both didn't work.
It's not about SCP/SFTP why I've pointed your attention to the article. It was about difference between PSCP and WinSCP.

It must be the following two lines which are the problem:

> 2006-01-12 15:50:51.843 echo "WinSCP: this is end-of-file:0"
! 2006-01-12 15:50:51.843 -sudosh: couldn't get your controlling terminal.

Does that mean WinSCP will never work with sudosh?
Can be. Depends on why sudosh need "controlling terminal" at all. WinSCP definitely do not have one. But neither pscp has.

Reply with quote

Advertisement

You can post new topics in this forum