RE: Using Key Pairs on OpenSSH on Win2k3
"Welsh, Armand" <[email protected]> Wed, 28 May 2008 16:42:11 -0700
| Newsgroups | gmane.network.ssh.windows |
|---|---|
| Message-ID | <078F02AD7EC1DF4FA30DC587C548679A01426DEC@INE000PB.IMSWEST.SSCIMS.com> |
This is a multi-part message in MIME format. ------_=_NextPart_001_01C8C11C.72E98152 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable okay, so once you SSH into devserver, then you from within devserver you are running the svnclient. =20 =20 Assuming you are using the default configuration of copSSH, then your bash path comes from: =20 /etc/profile =20 you can edit this file to modify the EXPORT command if you wish to change the PATH. My default /etc/profile looks like this: =20 $ cat /etc/profile =09 # If you wish to change the path for all users, it is recommended you edit # /etc/bash.bashrc =20 syspath=3D`/bin/cygpath -S` winpath=3D`/bin/cygpath -W` export PATH=3D"/bin:$syspath:$winpath" umask 027 =20 # Set a default prompt of: user@host and current_directory PS1=3D'\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' =09 Since you're probably running the default install, it should be the same. Just ignore the recomendation of editing /etc/bash.bashrc since the file doesn't exist on a default copSSH install, and editing the export here works just as well for such a simple installation. =20 See if that resolve your path issue. I recommend you change it as follows: =20 $ vi /etc/profile =09 # If you wish to change the path for all users, it is recommended you edit # /etc/bash.bashrc =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 # Set a default prompt of: user@host and current_directory PS1=3D'\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $ ' Also, I am not a bash pro, but I believe the proper form of the bash command for setting the path is: PATH=3D"$PATH:/cygdrive/c/Program\ Files/Subversion/Subversion/bin" =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 receiving a No such file or directory upon the set command (it's a syntax error issue). =20 Regards, Armand =20 =20 ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Robert Denton Sent: Wednesday, May 28, 2008 4:25 PM To: [email protected] Subject: RE: Using Key Pairs on OpenSSH on Win2k3 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 ________________________________ 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 =09 Okay, let me see if I can explain my set up a little bit. And you might be right about there being no connection between openssh and the ssl used to connect to the https server, but here goes: =09 user@svnserver ---(ssh)---> admin@devserver ---(https)---> svnserver =09 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 seems to be working with one weird exception: =09 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 OpenSSH) maintain it's own path variable? If so, where is it kept? =09 Robert=20 =09 ________________________________ 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 =09 =09 I don't think the copSSH and the https based activities are related. Regarding the connection to the other server (via https), how is this connection established? I need more information to understand the issue. Are you connecting (via ssh) to the server, and then on the server using wget or other command line util to get something from a web server? If you are using an SSH tunnel to connect 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 Armand ________________________________ 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 =09 =09 So I took your advice and installed CopSSH instead and it is working as desired, with one minor snag. First, the application I am using this for is to connect to the copssh server and run some commands. One of the commands involves connection to a different server via https. When I do this I get prompted to accept the certificate. Choosing 'p' for permanent has no effect. =09 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? And do you agree that this is the recommended course of action? =09 Robert =09 ________________________________ 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 =09 Robert, =09 Before I look into potential causes, the first I would like to know is: are you using copSSH, the Cygwin installation with the openSSH package installed, or the "openSSH for Windows" project from source forge? =09 Why do I ask? Al three are openSSH from the cygwin project the following conditions: Cygwin is the thick install proding the option to turn you windows box into a GNU Linux like operating system (via the bash or other shell and some special mappers built into cygwin). The cygwin 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 Vista. =09 CopSSH is a pre-packaged minimal installation of Cygwin with a couple minor enhancement patches that installs Cygwin, openSSH, configures you computer (even vista and win2k3) so that openSSH works without any tweaking at all. =09 "OpenSSH for Windows" is a dead sourceforge project that is almost identical to copSSH, except that development on the project has stopped a long time ago, and this package requires more tweaking of the ssh settings and the server that the other options, and is running very old ssh code that should not be used anymore in my opinion. =09 If you want the easy solution, install copSSH and everything will 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 services up and running with public keys, but you will have the option of using any piece of the cygwin project easily. =09 Armand =09 =09 ------_=_NextPart_001_01C8C11C.72E98152 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=3DContent-Type content=3D"text/html; = charset=3Dus-ascii"> <STYLE>BODY { FONT: 10pt Tahoma, Verdana, sans-serif } </STYLE> <META content=3D"MSHTML 6.00.6000.16640" name=3DGENERATOR></HEAD> <BODY> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>okay, so = once you SSH=20 into devserver, then you from within devserver you are running the=20 svnclient. </SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>Assuming = you are using=20 the default configuration of copSSH, then your bash path comes=20 from:</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008>/etc/profile</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-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 dir=3Dltr style=3D"MARGIN-RIGHT: 0px"> <DIV dir=3Dltr align=3Dleft><SPAN=20 class=3D614182923-28052008></SPAN> </DIV></BLOCKQUOTE> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>$ cat=20 /etc/profile</SPAN></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"><SPAN = class=3D614182923-28052008> <DIV dir=3Dltr align=3Dleft># If you wish to change the path for all = users, it is=20 recommended you edit<BR># /etc/bash.bashrc</SPAN></DIV> <DIV> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-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 dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008># Set a = default prompt=20 of: <A href=3D"mailto:user@host">user@host</A> and=20 current_directory<BR>PS1=3D'\[\033]0;\w\007<BR>\033[32m\]\u@\h=20 \[\033[33m\w\033[0m\]<BR>$ '<BR></SPAN></DIV></BLOCKQUOTE> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>Since = you're probably=20 running the default install, it should be the same. Just ignore = the=20 recomendation of editing /etc/bash.bashrc since the file doesn't exist = on a=20 default copSSH install, and editing the export here works just as well = for such=20 a simple installation.</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>See if that = resolve your=20 path issue. I recommend you change it as follows:</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008> </DIV></SPAN> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>$ vi=20 /etc/profile</SPAN></DIV> <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px"><SPAN = class=3D614182923-28052008> <DIV dir=3Dltr align=3Dleft># If you wish to change the path for all = users, it is=20 recommended you edit<BR># /etc/bash.bashrc</SPAN></DIV> <DIV> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-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 dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008># Set a = default prompt=20 of: <A href=3D"mailto:user@host">user@host</A> and=20 current_directory<BR>PS1=3D'\[\033]0;\w\007<BR>\033[32m\]\u@\h=20 \[\033[33m\w\033[0m\]<BR>$ '</SPAN><SPAN=20 class=3D614182923-28052008></DIV></SPAN></BLOCKQUOTE> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>Also, I am = not a bash=20 pro, but I believe the proper form of the bash command for setting the = path=20 is:</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN=20 class=3D614182923-28052008>PATH=3D"$PATH:/cygdrive/c/Program\=20 Files/Subversion/Subversion/bin"</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN class=3D614182923-28052008>By = specifying the $PATH=3D=20 you are actually causing the shell to think you want to execute the = contents of=20 $PATH, which is why you are receiving a No such file or directory upon = the set=20 command (it's a syntax error issue).</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008>Regards,</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008>Armand</SPAN></DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV dir=3Dltr align=3Dleft><SPAN = class=3D614182923-28052008></SPAN> </DIV> <DIV class=3DOutlookMessageHeader lang=3Den-us dir=3Dltr align=3Dleft> <HR tabIndex=3D-1> <B>From:</B> [email protected] [mailto:[email protected]] <B>On Behalf = Of=20 </B>Robert Denton<BR><B>Sent:</B> Wednesday, May 28, 2008 4:25 = PM<BR><B>To:</B>=20 [email protected]<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>admin@development ~<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, = then I=20 should (in theory) be able to select 'p' for permanent, and make this = problem go=20 away.<BR><BR>Robert <BR> <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,255) = 2px solid; MARGIN-RIGHT: 0px"> <HR> <B>From:</B> Robert Denton = [mailto:[email protected]]<BR><B>To:</B>=20 [email protected]<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 = might 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=20 href=3D"mailto:user@svnserver">user@svnserver</A> ---(ssh)---> <A=20 href=3D"mailto:admin@devserver">admin@devserver</A> ---(https)--->=20 svnserver<BR><BR>Seems weird to do it that way, but in order to = maintain=20 a mirror of our code on the dev server we need to issue an = 'update'=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 = part seems=20 to be working with one weird exception:<BR><BR>If I log onto the = devserver 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 = known. Does=20 Cygwin (or OpenSSH) maintain it's own path variable? If so, = where is it=20 kept?<BR><BR>Robert <BR> <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: = rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"> <HR> <B>From:</B> Welsh, Armand [mailto:<A=20 = href=3D"mailto:[email protected]">[email protected]</A>]<BR><= B>To:</B>=20 <A = href=3D"mailto:[email protected]">[email protected]</A><BR><B>Sent:</B>=20 Wed, 28 May 2008 14:33:24 -0700<BR><B>Subject:</B> RE: Using Key = Pairs on=20 OpenSSH on Win2k3<BR><BR> <DIV align=3Dleft><SPAN class=3D758572821-28052008>I don't think the = copSSH and=20 the https based activities are related. Regarding the = connection to=20 the other server (via https), how is this connection = established? I=20 need more information to understand the issue. Are you = connecting (via=20 ssh) to the server, and then on the server using wget or other = command line=20 util to get something from a web server? If you are using an = SSH=20 tunnel to connect to the https server using the ssh server as a = middle point=20 then I would need to know what client libraries on your client = computer are=20 used to establish the https session.</SPAN></DIV> <DIV align=3Dleft><SPAN = class=3D758572821-28052008></SPAN> </DIV> <DIV align=3Dleft><SPAN = class=3D758572821-28052008>Armand</SPAN></DIV><BR> <DIV class=3DOutlookMessageHeader align=3Dleft> <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=20 = href=3D"mailto:[email protected]">[email protected]</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 = application 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 = different=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 = <SPAN=20 style=3D"MARGIN-TOP: 0px; FONT: 90% monospace; 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 = such=20 file. Where does CopSSH place this file? And do you = agree that=20 this is the recommended course of action?</SPAN><BR><BR>Robert<BR> <BLOCKQUOTE=20 style=3D"PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: = rgb(0,0,255) 2px solid; MARGIN-RIGHT: 0px"> <HR> <B>From:</B> Welsh, Armand [mailto:<A=20 = href=3D"mailto:[email protected]">[email protected]</A>]<BR><= B>To:</B>=20 <A = href=3D"mailto:[email protected]">[email protected]</A><BR><B>Sent:</B>=20 Thu, 22 May 2008 09:17:19 -0700<BR><B>Subject:</B> Re: Using Key = Pairs on=20 OpenSSH on Win2k3<BR><BR>Robert,<BR><BR>Before I look into = potential=20 causes, the first I would like to know is: are you using copSSH, = the=20 Cygwin installation with the openSSH package installed, or the = "openSSH=20 for Windows" project from source forge?<BR><BR>Why do I ask? Al = three are=20 openSSH from the cygwin project the following = conditions:<BR>Cygwin is the=20 thick install proding the option to turn you windows box into a = GNU Linux=20 like operating system (via the bash or other shell and some = special=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 = that=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 = server=20 that the other options, and is running very old ssh code that = should not=20 be used anymore in my opinion.<BR><BR>If you want the easy = solution,=20 install copSSH and everything will work. If you want to get what = you have=20 working and you did not install copSSH then we can offer = assistance 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 = option of=20 using any piece of the cygwin project=20 easily.<BR><BR>Armand<BR><BR></BLOCKQUOTE></BLOCKQUOTE></BLOCKQUOTE> <STYLE> BODY {FONT:10pt Tahoma,Verdana,sans-serif} </STYLE> </BODY></HTML> ------_=_NextPart_001_01C8C11C.72E98152-- -- 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.