RE: Using Key Pairs on OpenSSH on Win2k3
"Robert Denton" <[email protected]> Thu, 29 May 2008 09:25:32 -0700
| Newsgroups | gmane.network.ssh.windows |
|---|---|
| Organization | Headsprout |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format. -------------07cc73faae5e88e67317900d51a605ee Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi there. This continues to baffle. I have edited the profile file as = you have recommended, as well as issued the more correct: PATH=3D"$PATH:/cygdrive/c/Program\ Files/Subversion/Subversion/bin" but I still get: admin@development ~ $ svn -bash: svn: command not found I even added a shortcut to svn.exe in windows/system32. All to no avail= . If this is not a path issue what else could it be=3F If it were a pe= rmissions problem I do not think I'd be getting the command not found er= ror. Robert=20 =5F=5F=5F=5F=5F =20 From: Welsh, Armand [mailto:[email protected]] To: [email protected] Sent: Wed, 28 May 2008 16:42:11 -0700 Subject: RE: Using Key Pairs on OpenSSH on Win2k3 =20 okay, so once you SSH into devserver, then you from within devserver y= ou are running the svnclient. =20 =20 Assuming you are using the default configuration of copSSH, then your = bash path comes from: =20 =20 /etc/profile =20 =20 you can edit this file to modify the EXPORT command if you wish to cha= nge the PATH. My default /etc/profile looks like this: =20 =20 $ cat /etc/profile =20 # If you wish to change the path for all users, it is recommended yo= u edit # /etc/bash.bashrc =20 =20 syspath=3D`/bin/cygpath -S` winpath=3D`/bin/cygpath -W` export PATH=3D"/bin:$syspath:$winpath" umask 027 =20 =20 # Set a default prompt of: user@host and current=5Fdirectory PS1=3D'\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' =20 Since you're probably running the default install, it should be the sa= me. Just ignore the recomendation of editing /etc/bash.bashrc since t= he file doesn't exist on a default copSSH install, and editing the exp= ort here works just as well for such a simple installation. =20 =20 See if that resolve your path issue. I recommend you change it as fol= lows: =20 =20 $ vi /etc/profile =20 # If you wish to change the path for all users, it is recommended yo= u edit # /etc/bash.bashrc =20 =20 syspath=3D`/bin/cygpath -S` winpath=3D`/bin/cygpath -W` export PATH=3D"/bin:$syspath:$winpath:cygdrive/c/Program\ Files/= Subversion/bin" umask 027 =20 =20 # Set a default prompt of: user@host and current=5Fdirectory PS1=3D'\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' =20 Also, I am not a bash pro, but I believe the proper form of the bash c= ommand for setting the path is: =20 PATH=3D"$PATH:/cygdrive/c/Program\ Files/Subversion/Subversion/bin" = =20 =20 By specifying the $PATH=3D you are actually causing the shell to think= you want to execute the contents of $PATH, which is why you are recei= ving a No such file or directory upon the set command (it's a syntax e= rror issue). =20 =20 Regards, =20 Armand =20 =20 =20 =5F=5F=5F=5F=5F =20 From: [email protected] [mailto:[email protected]] On Behalf Of Robe= rt Denton Sent: Wednesday, May 28, 2008 4:25 PM To: [email protected] Subject: RE: Using Key Pairs on OpenSSH on Win2k3 =20 Trying to append to the path seems to not work, also: admin@development ~ $ $PATH =3D $PATH:/cygdrive/c/Program\ Files/Subversion/bin/ -bash: /bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS: No such = file or directory This might be a key element in solving this problem. I say this since = if I could actually issue the svn co command from a ssh session, then I = should (in theory) be able to select 'p' for permanent, and make this = problem go away. Robert=20 =5F=5F=5F=5F=5F =20 From: Robert Denton [mailto:[email protected]] To: [email protected] Sent: Wed, 28 May 2008 15:56:32 -0700 Subject: RE: Using Key Pairs on OpenSSH on Win2k3 Okay, let me see if I can explain my set up a little bit. And you m= ight be right about there being no connection between openssh and th= e ssl used to connect to the https server, but here goes: user@svnserver ---(ssh)---> admin@devserver ---(https)---> svnserver Seems weird to do it that way, but in order to maintain a mirror of= our code on the dev server we need to issue an 'update' command to = the svn client on the dev server where we want the mirror, and this = is triggered by a process on the svn server itself. The first part seem= s to be working with one weird exception: If I log onto the devserver and launch a command prompt, the command= 'svn' is known by virtue of path. Oddly, if I ssh to that server as= the same user, the command 'ssh' is not known. Does Cygwin (or Open= SSH) maintain it's own path variable=3F If so, where is it kept=3F Robert=20 =5F=5F=5F=5F=5F =20 From: Welsh, Armand [mailto:[email protected]] To: [email protected] Sent: Wed, 28 May 2008 14:33:24 -0700 Subject: RE: Using Key Pairs on OpenSSH on Win2k3 =20 I don't think the copSSH and the https based activities are relate= d. Regarding the connection to the other server (via https), how = is this connection established=3F I need more information to unde= rstand the issue. Are you connecting (via ssh) to the server, and= then on the server using wget or other command line util to get s= omething from a web server=3F If you are using an SSH tunnel to c= onnect to the https server using the ssh server as a middle point = then I would need to know what client libraries on your client computer = are used to establish the https session. =20 =20 Armand =20 =5F=5F=5F=5F=5F =20 From: [email protected] [mailto:[email protected]] On = Behalf Of Robert Denton Sent: Wednesday, May 28, 2008 12:49 PM To: [email protected] Subject: Re: Using Key Pairs on OpenSSH on Win2k3 =20 So I took your advice and installed CopSSH instead and it is worki= ng as desired, with one minor snag. First, the application I am u= sing this for is to connect to the copssh server and run some comm= ands. One of the commands involves connection to a different serv= er via https. When I do this I get prompted to accept the certifi= cate. Choosing 'p' for permanent has no effect. Advice I have gotten from other forums is that I need to download = Comodo's Trusted Root Certificate and append it to the end of the = ca-bundle.crt that is used by OpenSSH. Unfortunately a search of = the system yields no such file. Where does CopSSH place this file= =3F And do you agree that this is the recommended course of actio= n=3F Robert =5F=5F=5F=5F=5F =20 From: Welsh, Armand [mailto:[email protected]] To: [email protected] Sent: Thu, 22 May 2008 09:17:19 -0700 Subject: Re: Using Key Pairs on OpenSSH on Win2k3 Robert, Before I look into potential causes, the first I would like to k= now is: are you using copSSH, the Cygwin installation with the o= penSSH package installed, or the "openSSH for Windows" project f= rom source forge=3F Why do I ask=3F Al three are openSSH from the cygwin project the= following conditions: Cygwin is the thick install proding the option to turn you windo= ws box into a GNU Linux like operating system (via the bash or o= ther shell and some special mappers built into cygwin). The cygw= in project installs a basic configuration of openSSH which works= well on older windows systems, but requires specific things be = done to get the SSH server to work 100% on windows 2003 and Vist= a. CopSSH is a pre-packaged minimal installation of Cygwin with a c= ouple minor enhancement patches that installs Cygwin, openSSH, c= onfigures you computer (even vista and win2k3) so that openSSH w= orks without any tweaking at all. "OpenSSH for Windows" is a dead sourceforge project that is almo= st identical to copSSH, except that development on the project h= as stopped a long time ago, and this package requires more tweak= ing of the ssh settings and the server that the other options, a= nd is running very old ssh code that should not be used anymore = in my opinion. If you want the easy solution, install copSSH and everything wil= l work. If you want to get what you have working and you did not= install copSSH then we can offer assistance with making all the= appropriate changes, but it will take more time to get SSH serv= ices up and running with public keys, but you will have the option of = using any piece of the cygwin project easily. Armand =20 -------------07cc73faae5e88e67317900d51a605ee 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> Hi there. This continues to baffle. I have edited the profil= e file as you have recommended, as well as issued the more correct:<br><= br><span class=3D"614182923-28052008">PATH=3D"$PATH:/cygdrive/c/Program\= =20 Files/Subversion/Subversion/bin"<br><br>but I still get:<br><br>admin@de= velopment ~<br>$ svn<br>-bash: svn: command not found<br><br>I even adde= d a shortcut to svn.exe in windows/system32. All to no avail. = ; If this is not a path issue what else could it be=3F If it were = a permissions problem I do not think I'd be getting the command not foun= d error.<br><br></span><br>Robert <br><blockquote style=3D"border-left: = 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-ri= ght: 0px;"><hr><b>From:</b> Welsh, Armand [mailto:[email protected]= m]<br><b>To:</b> [email protected]<br><b>Sent:</b> Wed, 28 May 2008 16:4= 2:11 -0700<br><b>Subject:</b> RE: Using Key Pairs on OpenSSH on Win2k3<b= r><br> <div align=3D"left"><span class=3D"614182923-28052008">okay, so once you= SSH=20 into devserver, then you from within devserver you are running the=20 svnclient. </span></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">Assuming you are = using=20 the default configuration of copSSH, then your bash path comes=20 from:</span></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">/etc/profile</spa= n></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">you can edit this= file to=20 modify the EXPORT command if you wish to change the PATH. My = default=20 /etc/profile looks like this:</span></div> <blockquote style=3D"margin-right: 0px;"> <div align=3D"left"><span class=3D"614182923-28052008"></span> </= div></blockquote> <div align=3D"left"><span class=3D"614182923-28052008">$ cat=20 /etc/profile</span></div> <blockquote style=3D"margin-right: 0px;"><span class=3D"614182923-280520= 08"> <div align=3D"left"># If you wish to change the path for all users, it= is=20 recommended you edit<br># /etc/bash.bashrc</div> <div> </div> <div align=3D"left"><span class=3D"614182923-28052008">syspath=3D`/bin= /cygpath=20 -S`<br>winpath=3D`/bin/cygpath -W`<br>export=20 PATH=3D"/bin:$syspath:$winpath"<br>umask 027</span></div> <div> </div> <div align=3D"left"><span class=3D"614182923-28052008"># Set a default= prompt=20 of: <a href=3D"mailto:user@host">user@host</a> and=20 current=5Fdirectory<br>PS1=3D'\[\033]0;\w\007<br>\033[32m\]\u@\h=20 \[\033[33m\w\033[0m\]<br>$ '<br></span></div></span></blockquote> <div align=3D"left"><span class=3D"614182923-28052008">Since you're prob= ably=20 running the default install, it should be the same. Just ignore th= e=20 recomendation of editing /etc/bash.bashrc since the file doesn't exist o= n a=20 default copSSH install, and editing the export here works just as well f= or such=20 a simple installation.</span></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">See if that resol= ve your=20 path issue. I recommend you change it as follows:</span></div> <div align=3D"left"><span class=3D"614182923-28052008"> </span></di= v> <div align=3D"left"><span class=3D"614182923-28052008">$ vi=20 /etc/profile</span></div> <blockquote style=3D"margin-right: 0px;"><span class=3D"614182923-280520= 08"> <div align=3D"left"># If you wish to change the path for all users, it= is=20 recommended you edit<br># /etc/bash.bashrc</div> <div> </div> <div align=3D"left"><span class=3D"614182923-28052008">syspath=3D`/bin= /cygpath=20 -S`<br>winpath=3D`/bin/cygpath -W`<br>export=20 PATH=3D"/bin:$syspath:$winpath:cygdrive/c/Program\=20 Files/Subversion/bin"<br>umask 027</span></div> <div> </div> <div align=3D"left"><span class=3D"614182923-28052008"># Set a default= prompt=20 of: <a href=3D"mailto:user@host">user@host</a> and=20 current=5Fdirectory<br>PS1=3D'\[\033]0;\w\007<br>\033[32m\]\u@\h=20 \[\033[33m\w\033[0m\]<br>$ '</span><span class=3D"614182923-28052008">= </span></div></span></blockquote> <div align=3D"left"><span class=3D"614182923-28052008">Also, I am not a = bash=20 pro, but I believe the proper form of the bash command for setting the p= ath=20 is:</span></div> <div align=3D"left"><span class=3D"614182923-28052008">PATH=3D"$PATH:/cy= gdrive/c/Program\=20 Files/Subversion/Subversion/bin"</span></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">By specifying the= $PATH=3D=20 you are actually causing the shell to think you want to execute the cont= ents of=20 $PATH, which is why you are receiving a No such file or directory upon t= he set=20 command (it's a syntax error issue).</span></div> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008">Regards,</span></= div> <div align=3D"left"><span class=3D"614182923-28052008">Armand</span></di= v> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div align=3D"left"><span class=3D"614182923-28052008"></span> </di= v> <div class=3D"OutlookMessageHeader" align=3D"left"> <hr> <b>From:</b> <a href=3D"mailto:[email protected]">[email protected]</a> = [mailto:<a href=3D"mailto:[email protected]">[email protected]</a>] <b>O= n Behalf Of=20 </b>Robert Denton<br><b>Sent:</b> Wednesday, May 28, 2008 4:25 PM<br><b>= To:</b>=20 <a href=3D"mailto:[email protected]">[email protected]</a><br><b>Subject= :</b> RE: Using Key Pairs on OpenSSH on=20 Win2k3<br><br></div> <div></div>Trying to append to the path seems to not work,=20 also:<br><br><a href=3D"mailto:admin@development">admin@development</a> = ~<br>$ $PATH =3D $PATH:/cygdrive/c/Program\=20 Files/Subversion/bin/<br>-bash:=20 /bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS: No such file or= =20 directory<br><br>This might be a key element in solving this problem. I = say this=20 since if I could actually issue the svn co command from a ssh session, t= hen I=20 should (in theory) be able to select 'p' for permanent, and make this pr= oblem go=20 away.<br><br>Robert <br> <blockquote style=3D"border-left: 2px solid rgb(0, 0, 255); padding-left= : 5px; margin-left: 5px; margin-right: 0px;"> <hr> <b>From:</b> Robert Denton [mailto:<a href=3D"mailto:robert@headsprout= .com">[email protected]</a>]<br><b>To:</b>=20 <a href=3D"mailto:[email protected]">[email protected]</a><br><b>Sent:= </b> Wed, 28 May 2008 15:56:32=20 -0700<br><b>Subject:</b> RE: Using Key Pairs on OpenSSH on Win2k3<br><= br>Okay,=20 let me see if I can explain my set up a little bit. And you migh= t be=20 right about there being no connection between openssh and the ssl used= to=20 connect to the https server, but here goes:<br><br><a href=3D"mailto:u= ser@svnserver">user@svnserver</a> ---(ssh)---> <a href=3D"mailto:admi= n@devserver">admin@devserver</a> ---(https)--->=20 svnserver<br><br>Seems weird to do it that way, but in order to mainta= in=20 a mirror of our code on the dev server we need to issue an 'upda= te'=20 command to the svn client on the dev server where we want the mirror, = and this=20 is triggered by a process on the svn server itself. The first pa= rt seems=20 to be working with one weird exception:<br><br>If I log onto the devse= rver and=20 launch a command prompt, the command 'svn' is known by virtue of path.= Oddly,=20 if I ssh to that server as the same user, the command 'ssh' is not kno= wn. Does=20 Cygwin (or OpenSSH) maintain it's own path variable=3F If so, wh= ere is it=20 kept=3F<br><br>Robert <br> <blockquote style=3D"border-left: 2px solid rgb(0, 0, 255); padding-le= ft: 5px; margin-left: 5px; margin-right: 0px;"> <hr> <b>From:</b> Welsh, Armand [mailto:<a href=3D"mailto:Armand.Welsh@ss= cims.com">[email protected]</a>]<br><b>To:</b>=20 <a href=3D"mailto:[email protected]">[email protected]</a><br><b>Sen= t:</b>=20 Wed, 28 May 2008 14:33:24 -0700<br><b>Subject:</b> RE: Using Key Pai= rs on=20 OpenSSH on Win2k3<br><br> <div align=3D"left"><span class=3D"758572821-28052008">I don't think= the copSSH and=20 the https based activities are related. Regarding the connecti= on to=20 the other server (via https), how is this connection established=3F&= nbsp; I=20 need more information to understand the issue. Are you connect= ing (via=20 ssh) to the server, and then on the server using wget or other comma= nd line=20 util to get something from a web server=3F If you are using an= SSH=20 tunnel to connect to the https server using the ssh server as a midd= le point=20 then I would need to know what client libraries on your client compu= ter are=20 used to establish the https session.</span></div> <div align=3D"left"><span class=3D"758572821-28052008"></span> = </div> <div align=3D"left"><span class=3D"758572821-28052008">Armand</span>= </div><br> <div class=3D"OutlookMessageHeader" align=3D"left"> <hr> <b>From:</b> <a href=3D"mailto:[email protected]">[email protected]<= /a>=20 [mailto:<a href=3D"mailto:[email protected]">[email protected]</a>] = <b>On=20 Behalf Of </b>Robert Denton<br><b>Sent:</b> Wednesday, May 28, 2008 = 12:49=20 PM<br><b>To:</b> <a href=3D"mailto:[email protected]">ssh@erdelynet.= com</a><br><b>Subject:</b> Re:=20 Using Key Pairs on OpenSSH on Win2k3<br><br></div> <div></div>So I took your advice and installed CopSSH instead and it= is=20 working as desired, with one minor snag. First, the applicatio= n I am=20 using this for is to connect to the copssh server and run some=20 commands. One of the commands involves connection to a differe= nt=20 server via https. When I do this I get prompted to accept the= =20 certificate. Choosing 'p' for permanent has no effect.<br><br>= Advice I=20 have gotten from other forums is that I need to download Comodo's <s= pan style=3D"margin-top: 0px; font-family: monospace; font-style: normal= ; font-variant: normal; font-weight: normal; font-size: 90%; line-height= : normal; font-size-adjust: none; font-stretch: normal;">Trusted=20 Root Certificate and append it to the end of the ca-bundle.crt that = is used=20 by OpenSSH. Unfortunately a search of the system yields no suc= h=20 file. Where does CopSSH place this file=3F And do you ag= ree that=20 this is the recommended course of action=3F</span><br><br>Robert<br> <blockquote style=3D"border-left: 2px solid rgb(0, 0, 255); padding-= left: 5px; margin-left: 5px; margin-right: 0px;"> <hr> <b>From:</b> Welsh, Armand [mailto:<a href=3D"mailto:Armand.Welsh@= sscims.com">[email protected]</a>]<br><b>To:</b>=20 <a href=3D"mailto:[email protected]">[email protected]</a><br><b>S= ent:</b>=20 Thu, 22 May 2008 09:17:19 -0700<br><b>Subject:</b> Re: Using Key P= airs on=20 OpenSSH on Win2k3<br><br>Robert,<br><br>Before I look into potenti= al=20 causes, the first I would like to know is: are you using copSSH, t= he=20 Cygwin installation with the openSSH package installed, or the "op= enSSH=20 for Windows" project from source forge=3F<br><br>Why do I ask=3F A= l three are=20 openSSH from the cygwin project the following conditions:<br>Cygwi= n is the=20 thick install proding the option to turn you windows box into a GN= U Linux=20 like operating system (via the bash or other shell and some specia= l=20 mappers built into cygwin). The cygwin project installs a basic=20 configuration of openSSH which works well on older windows systems= , but=20 requires specific things be done to get the SSH server to work 100= % on=20 windows 2003 and Vista.<br><br>CopSSH is a pre-packaged minimal=20 installation of Cygwin with a couple minor enhancement patches tha= t=20 installs Cygwin, openSSH, configures you computer (even vista and = win2k3)=20 so that openSSH works without any tweaking at all.<br><br>"OpenSSH= for=20 Windows" is a dead sourceforge project that is almost identical to= copSSH,=20 except that development on the project has stopped a long time ago= , and=20 this package requires more tweaking of the ssh settings and the se= rver=20 that the other options, and is running very old ssh code that shou= ld not=20 be used anymore in my opinion.<br><br>If you want the easy solutio= n,=20 install copSSH and everything will work. If you want to get what y= ou have=20 working and you did not install copSSH then we can offer assistanc= e with=20 making all the appropriate changes, but it will take more time to = get SSH=20 services up and running with public keys, but you will have the op= tion of=20 using any piece of the cygwin project=20 easily.<br><br>Armand<br><br></blockquote></blockquote></blockquote> </blockquote><style> BODY {FONT:10pt Tahoma,Verdana,sans-serif} </style> </body></html> -------------07cc73faae5e88e67317900d51a605ee-- -- 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.