Not getting Interactive Shell

Topics: Developer Forum, User Forum
Jun 27, 2007 at 10:57 AM
I have installed the SSHD on a Win CE 5.0 machine and connecting to it using PUTTY.EXE. Putty authenticates the uid and pwd, but the shell hangs there and I am not able to issue any commands. This is putty log says,

2007-06-27 15:17:51 Looking up host ""
2007-06-27 15:17:51 Connecting to port 22
2007-06-27 15:17:51 Server version: SSH-2.0-SSH server for windows CE. Based on OpenSSH_4.3
2007-06-27 15:17:51 We claim version: SSH-2.0-PuTTYRelease0.60
2007-06-27 15:17:51 Using SSH protocol version 2
2007-06-27 15:17:51 Doing Diffie-Hellman group exchange
2007-06-27 15:17:51 Doing Diffie-Hellman key exchange with hash SHA-1
2007-06-27 15:17:52 Host key fingerprint is:
2007-06-27 15:17:52 ssh-dss 768 84:a8:f7:33:73:ee:c9:96:08:5a:3d:a1:bf:06:48:92
2007-06-27 15:17:52 Initialised AES-256 SDCTR client->server encryption
2007-06-27 15:17:52 Initialised HMAC-SHA1 client->server MAC algorithm
2007-06-27 15:17:52 Initialised AES-256 SDCTR server->client encryption
2007-06-27 15:17:52 Initialised HMAC-SHA1 server->client MAC algorithm
2007-06-27 15:17:53 Keyboard-interactive authentication refused
2007-06-27 15:17:55 Sent password
2007-06-27 15:17:55 Access granted
2007-06-27 15:17:55 Opened channel for session
2007-06-27 15:17:55 Allocated pty (ospeed 38400bps, ispeed 38400bps)

Any clue about this problem ??

Jun 28, 2007 at 7:59 AM
I have used the following sshd_config file,
  1. Package generated configuration file
  2. See the sshd(8) manpage for details

  1. What ports, IPs and protocols we listen for
Port 22
  1. Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
Protocol 2
  1. HostKeys for protocol version 2
#HostKey /NandFlash/ssh/sshhostrsa_key
HostKey /Platform/sshhostdsa_key


#Privilege Separation is turned on for security
#UsePrivilegeSeparation yes NOT SUPPORTED

  1. Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768

  1. Logging
SyslogFacility AUTH
LogLevel INFO

  1. Authentication:
LoginGraceTime 600
PermitRootLogin yes
StrictModes yes

RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys

  1. Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
  1. For this to work you will also need host keys in /etc/sshknownhosts
RhostsRSAAuthentication no
  1. similar for protocol version 2
HostbasedAuthentication no
  1. Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes

  1. To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no

  1. Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

  1. Change to yes to enable tunnelled clear text passwords
PasswordAuthentication yes

  1. To change Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#AFSTokenPassing no
#KerberosTicketCleanup no

  1. Kerberos TGT Passing does only work with the AFS kaserver
#KerberosTgtPassing yes

X11Forwarding no
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
KeepAlive yes
#UseLogin no

#MaxStartups 10:30:60
#Banner /nandflash/ssh/banner.txt

#Port forwarding enabled
#gatewayports clientspecified
gatewayports no

Subsystem sftp sftp-server

UsePAM yes
Jul 2, 2007 at 1:42 PM
Found the solution at last!
The issue was neither with config file nor on the code, it was with the DLL. The SocketToFile.DLL file was in the "\Hard Disk" folder and it was not able to get the path. I moved file to Windows directory and SSH started working fine.