Using Key Pairs on OpenSSH on Win2k3

"Robert Denton" <[email protected]> Thu, 22 May 2008 08:48:50 -0700
Newsgroups gmane.network.ssh.windows
Organization Headsprout
Message-ID <[email protected]>
This is a multi-part message in MIME format.

-------------bdc6e6f286ed3958d3163df887567786
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hello all, I am hoping someone on this list has a good idea how to resol=
ve the following difficulty.  I need to connect from a linux server to a=
 windows server via ssh in a script and I need to use keypairs to do thi=
s.=20

I have installed Openssh on the win2k3 server and I have implemented the=
 keypairs.  Connecting to the win2k3 server it seems that the keypairs a=
re working well, but then I am immediately disconnected from the win2k3 =
server.  Running ssh with the verbose switch, I get the following:

debug1: Authentications that can continue: publickey,password,keyboard-i=
nteractive
debug1: Next authentication method: publickey
debug1: Trying private key: /root/.ssh/identity
debug1: Offering public key: /root/.ssh/id=5Frsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG =3D en=5FUS.UTF-8
Last login: Wed May 21 15:44:10 2008 from Larry
debug1: client=5Finput=5Fchannel=5Freq: channel 0 rtype exit-status repl=
y 0
debug1: channel 0: free: client-session, nchannels 1
Connection to production closed.
debug1: Transferred: stdin 0, stdout 0, stderr 35 bytes in 0.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 178.7
debug1: Exit status 255

I am currently researching the exit status 255 message, but for the rest=
 I am not sure.  The authentication is clearly working and I get into th=
e server based on the key exchange but I am being booted right back out.=
  Another oddity, and I am at a loss to explain this so far, the StrictM=
odes option in sshd=5Fconfig plays a role:  when set to yes, the keypair=
 authentication fails.  When set to no, it succeeds but I am immediately=
 disconnected form the server.

Any ideas=3F


Robert=20
-------------bdc6e6f286ed3958d3163df887567786
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE html PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>
<html>
<head>
 <meta http-equiv=3D'Content-Type' content=3D'text/html;charset=3Dus-asc=
ii'>
 <style>BODY{font:10pt Tahoma, Verdana, sans-serif;}</style>
</head>
<body>
Hello all, I am hoping someone on this list has a good idea how to resol=
ve the following difficulty.&nbsp; I need to connect from a linux server=
 to a windows server via ssh in a script and I need to use keypairs to d=
o this. <br><br>I have installed Openssh on the win2k3 server and I have=
 implemented the keypairs.&nbsp; Connecting to the win2k3 server it seem=
s that the keypairs are working well, but then I am immediately disconne=
cted from the win2k3 server.&nbsp; Running ssh with the verbose switch, =
I get the following:<br><br>debug1: Authentications that can continue: p=
ublickey,password,keyboard-interactive<br>debug1: Next authentication me=
thod: publickey<br>debug1: Trying private key: /root/.ssh/identity<br>de=
bug1: Offering public key: /root/.ssh/id=5Frsa<br>debug1: Server accepts=
 key: pkalg ssh-rsa blen 277<br>debug1: read PEM private key done: type =
RSA<br>debug1: Authentication succeeded (publickey).<br>debug1: channel =
0: new [client-session]<br>debug1: Entering interactive session.<br>debu=
g1: Sending environment.<br>debug1: Sending env LANG =3D en=5FUS.UTF-8<b=
r>Last login: Wed May 21 15:44:10 2008 from Larry<br>debug1: client=5Fin=
put=5Fchannel=5Freq: channel 0 rtype exit-status reply 0<br>debug1: chan=
nel 0: free: client-session, nchannels 1<br>Connection to production clo=
sed.<br>debug1: Transferred: stdin 0, stdout 0, stderr 35 bytes in 0.2 s=
econds<br>debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 178.7<=
br>debug1: Exit status 255<br><br>I am currently researching the exit st=
atus 255 message, but for the rest I am not sure.&nbsp; The authenticati=
on is clearly working and I get into the server based on the key exchang=
e but I am being booted right back out.&nbsp; Another oddity, and I am a=
t a loss to explain this so far, the StrictModes option in sshd=5Fconfig=
 plays a role:&nbsp; when set to yes, the keypair authentication fails.&=
nbsp; When set to no, it succeeds but I am immediately disconnected form=
 the server.<br><br>Any ideas=3F<br><br><br>Robert&nbsp;</body></html>
-------------bdc6e6f286ed3958d3163df887567786--


--
List Info:      http://erdelynet.com/ssh-l/
List Archives:  http://erdelynet.com/archive/ssh-l/
To Unsubscribe: Mail mailto:[email protected]
If you are having trouble unsubscribing, visit the List Info page for help.