openssh on windows 2003 ends with "exit status 255" ==> solution

From: chekov_1 (chekov_1_at_yahoo.ca)
Date: 01/18/05


Date: 18 Jan 2005 06:41:02 -0800

Hi,

openssh v3.8.1

In my case, the client is running on WinXP and the server on Win2003.
Installation is very simple (just follow the process). The
installation on the server is creating a service called "OpenSSH
Server" which is starting the following program
"...\openssh\bin\cygrunsrv.exe". That is where the problem is. This
is not the program that should be started. To make the communication
work, without having to use the password method, you have to disable
the service, and instead start the following program
"...\openssh\usr\sbin\sshd.exe".

Here is an example of the sshd_config file
#BEGIN of sshd_config file ###########
# $OpenBSD: sshd_config,v 1.65 2003/08/28 12:54:34 markus Exp $

# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin

# The strategy used for options in the default sshd_config shipped
with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
HostKey /etc/ssh_host_key
# HostKeys for protocol version 2
HostKey /etc/ssh_host_rsa_key
HostKey /etc/ssh_host_dsa_key

# Process ID File
PidFile /var/run/sshd.pid

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
#obsoletes QuietMode and FascistLogging
SyslogFacility AUTH
LogLevel INFO
# Autre option disponible pour LogLevel
#LogLevel verbose
#LogLevel DEBUG3

# Authentication:

#LoginGraceTime 2m
PermitRootLogin yes

# The following setting overrides permission checks on host key files
# and directories. For security reasons set this to "yes" when running
# NT/W2K, NTFS and CYGWIN=ntsec.
StrictModes no

RSAAuthentication no

# active/désactive l'authentication PublicKey
# PublicKey et Password ne peuvent pas etre activé en même temps
PubkeyAuthentication yes
AuthorizedKeysFile /ssh/authorized_keys

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

# active/désactive l'authentication password
# Password et PublicKey ne peuvent pas etre activé en même temps
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication no
#PermitEmptyPasswords no

# active/désactive l'authentication keyboard-interactive
# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes

# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCreds yes

# Set this to 'yes' to enable PAM authentication (via
challenge-response)
# and session processing. Depending on your PAM configuration, this
may
# bypass the setting of 'PasswordAuthentication'
#UsePAM yes

#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
PermitUserEnvironment yes
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes

#VerifyReverseMapping no

MaxStartups 10:30:60

# default banner path
Banner /etc/banner.txt

# override default of no subsystems
Subsystem sftp /usr/sbin/sftp-server
#END of sshd_config file ###########

The file authorized_keys has to be in "...\openssh\ssh" directory

Files that are pathed to the "\openssh\ssh\.ssh" do not seem to work;
so move them in a different directory. In my case i moved them to the
"...\openssh\etc" or "...\openssh\ssh" directory. Just make sure that
the sshd_config reflects where you put your files.

The only thing i was not able to configure to work was the
"environment" file. There seems to be a glitch in that area.

N.B. By the way using the password method works normally with the
default service installed.

chekov_1.



Relevant Pages


Quantcast