Topic: Lost connection

I try to configure and run the SFTP based on MySecureShell. I have:
1. installed package on Ubuntu 8.4
2. added user with /bin/MySecureShell
3. started the /etc/init.d/mysecureshell
4. started sshd because I see that mss don't listen on the port 22.

All I get is connection lost. I can't find any information according to this problem.

root@lukaszl1-desktop:/mnt/server-nfs/working/pkgs.src# scp ./VMWare/Lizenz.txt testuser@192.168.248.184:/Lizenz.txt
testuser@192.168.248.184's password:
Environment:
  USER=testuser
  LOGNAME=testuser
  HOME=/shares
  PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin
  MAIL=/var/mail/testuser
  SHELL=/bin/MySecureShell
  SSH_CLIENT=192.168.242.13 51447 22
  SSH_CONNECTION=192.168.242.13 51447 192.168.248.184 22
lost connection

Do someone have get similar problem ?

Re: Lost connection

Hi,

Could we see your configuration file please ?

Thanks

3 (edited by JoKnarf 2008-06-18 10:57:56)

Re: Lost connection

You cannot use scp, only sftp

JoK

Re: Lost connection

Right - the filezilla client works. But I still get problems with GFTP:

Running program ssh -e none -l testuser -p 22 192.168.248.184 -s sftp
3: Protocol Initialization
testuser@192.168.248.184's password: 
Error: Could not read from socket: Connection reset by peer
Disconnecting from site 192.168.248.184
Waiting 30 seconds until trying to connect again

Is there a list of supported sftp clients ?

Re: Lost connection

Gftp works.

On which version are you ? Which distrib ?

Thx

Re: Lost connection

Hi,

kame_pl wrote:

Is there a list of supported sftp clients ?

In the great theory all sftp clients should work.

But don't forget, sftp is for secure file transfert NOT ftp over SSL wink

Re: Lost connection

gFTP is 2.0.18 on the Kubuntu 8.04

But I have restarted the system with SFTP and it stop working... I'm completely lost hmm sftp-state shows that it is UP and the ssh connection is running but I get "Fatal: unable to initialise SFTP on server: could not connect:" on filezilla now.

I have added subsystem regarding to some information that I have found here :
http://mysecureshell.sourceforge.net/fr/faq.html
..but it does not help.

SSHD debug result:

debug1: sshd version OpenSSH_3.8.1p1 Debian-8.sarge.4
debug1: read PEM private key done: type RSA
debug1: private host key: #0 type 1 RSA
debug1: read PEM private key done: type DSA
debug1: private host key: #1 type 2 DSA
debug1: Bind to port 22 on 0.0.0.0.
Server listening on 0.0.0.0 port 22.
debug1: Server will not fork when running in debugging mode.
Connection from 192.168.242.13 port 40654
debug1: Client protocol version 2.0; client software version PuTTY_Local:_Mar_23_2008_18:27:21
debug1: no match: PuTTY_Local:_Mar_23_2008_18:27:21
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1 Debian-8.sarge.4
debug1: permanently_set_uid: 91/65534
debug1: list_hostkey_types: ssh-rsa,ssh-dss
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: client->server aes256-ctr hmac-sha1 none
debug1: kex: server->client aes256-ctr hmac-sha1 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST_OLD received
debug1: SSH2_MSG_KEX_DH_GEX_GROUP sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_INIT
debug1: SSH2_MSG_KEX_DH_GEX_REPLY sent
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: KEX done
debug1: userauth-request for user testuser service ssh-connection method none
debug1: attempt 0 failures 0
Failed none for testuser from 192.168.242.13 port 40654 ssh2
Failed none for testuser from 192.168.242.13 port 40654 ssh2
debug1: userauth-request for user testuser service ssh-connection method keyboard-interactive
debug1: attempt 1 failures 1
debug1: keyboard-interactive devs 
debug1: auth2_challenge: user=testuser devs=
debug1: kbdint_alloc: devices 'pam'
debug1: auth2_challenge_start: trying authentication method 'pam'
Failed keyboard-interactive for testuser from 192.168.242.13 port 40654 ssh2
debug1: userauth-request for user testuser service ssh-connection method password
debug1: attempt 2 failures 2
Accepted password for testuser from 192.168.242.13 port 40654 ssh2
debug1: monitor_child_preauth: testuser has been authenticated by privileged process
Accepted password for testuser from 192.168.242.13 port 40654 ssh2
debug1: permanently_set_uid: 70/100
debug1: Entering interactive session for SSH2.
debug1: server_init_dispatch_20
debug1: server_input_channel_open: ctype session rchan 256 win 2147483647 max 16384
debug1: input_session_request
debug1: channel 0: new [server-session]
debug1: session_new: init
debug1: session_new: session 0
debug1: session_open: channel 0
debug1: session_open: session 0: link with channel 0
debug1: server_input_channel_open: confirm session
debug1: server_input_channel_req: channel 0 request simple@putty.projects.tartarus.org reply 0
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req simple@putty.projects.tartarus.org
debug1: server_input_channel_req: channel 0 request subsystem reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req subsystem
subsystem request for sftp
subsystem request for sftp failed, subsystem not found
debug1: server_input_channel_req: channel 0 request exec reply 1
debug1: session_by_channel: session 0 channel 0
debug1: session_input_channel_req: session 0 req exec
debug1: Received SIGCHLD.
debug1: session_by_pid: pid 13882
debug1: session_exit_message: session 0 channel 0 pid 13882
debug1: session_exit_message: release channel 0
debug1: session_close: session 0 pid 13882
debug1: channel 0: free: server-session, nchannels 1
Connection closed by 192.168.242.13
debug1: do_cleanup
Closing connection to 192.168.242.13

SSHD config:

Protocol 2
port 22
ListenAddress 0.0.0.0
AllowUsers testuser testuser2
PasswordAuthentication yes
KeyRegenerationInterval 3600
ServerKeyBits 768
SyslogFacility AUTH
LogLevel INFO
LoginGraceTime 120
PermitRootLogin no
StrictModes yes
X11Forwarding no
X11DisplayOffset 10
PrintLastLog no
KeepAlive yes
DenyUsers All
PrintLastLog yes
Compression yes
ClientAliveInterval 30
PidFile /var/run/sshd_sftp.pid
#subsystem sftp /bin/MySecureShell.sh

SFTP is default from instal.sh.

Re: Lost connection

Hi,

The simple way, to use MySecureShell for an account, is to set user with shell /bin/MySecureShell smile.

For FileZilla, users use 2 connections by ip so take car about your config file wink