RE: 1.5.12: ssh hangs with Windows XP SP2
Hello all, Has there been any traction regarding the pipe code issues and XP SP2? I've keeping up with the posts, but have not seen any mention of a possible work around or patch coming. Thanks much, Garrett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Waiss, Garrett Sent: Thursday, December 09, 2004 1:03 PM To: cygwin@cygwin.com Subject: RE: 1.5.12: ssh hangs with Windows XP SP2 Unfortunately, -n doesn't help. I actually looked in the archives under "ssh hangs" and read the various messages. I am really hoping that there will a resolution for the pipe issue. Thanks for the response. Garrett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Pechtchanski Sent: Thursday, December 09, 2004 10:42 AM To: Waiss, Garrett Cc: cygwin@cygwin.com Subject: Re: 1.5.12: ssh hangs with Windows XP SP2 On Wed, 8 Dec 2004, Waiss, Garrett wrote: > Cygwin version: 1.5.12 > OS: Windows XP SP2 > > Before applying the SP2, ssh was working fine. Now ssh will hang with > this specfic case. > > This works: > sh -c "ssh -i c:/keys/id_foo [EMAIL PROTECTED] 'ls -l /opt/'" > > However, putting this into a java class for instance will cause this > to > hang: > > > import java.io.*; > > public class test { >public static void main(String[] args) { > try { > final String cmd = "/bin/ssh -p 22 -i c:/keys/id_foo [EMAIL > PROTECTED] 'ls -l /opt'"; > final Process p = Runtime.getRuntime().exec(new String[] { > "sh", "-c", cmd > }); > final InputStreamReader isr = new InputStreamReader(p.getInputStream()); > final BufferedReader br = new BufferedReader(isr); > String line; > final StringBuffer sb = new StringBuffer(0); > while((line = br.readLine()) != null) { > sb.append(line); > sb.append('\n'); > } > System.out.println(sb.toString()); > } > catch (Exception e) { > System.out.println(e.getMessage()); > } >} > } > > > Is there a solution to this problem? It's usually recommended to invoke remote commands that don't require input with the "-n" ssh flag, which will close stdin -- try that. If it doesn't help, this could be the problem with the new pipe code that's been mentioned on this list -- search the web archives for "ssh hangs". HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
RE: 1.5.12: ssh hangs with Windows XP SP2
Unfortunately, -n doesn't help. I actually looked in the archives under "ssh hangs" and read the various messages. I am really hoping that there will a resolution for the pipe issue. Thanks for the response. Garrett -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Igor Pechtchanski Sent: Thursday, December 09, 2004 10:42 AM To: Waiss, Garrett Cc: [EMAIL PROTECTED] Subject: Re: 1.5.12: ssh hangs with Windows XP SP2 On Wed, 8 Dec 2004, Waiss, Garrett wrote: > Cygwin version: 1.5.12 > OS: Windows XP SP2 > > Before applying the SP2, ssh was working fine. Now ssh will hang with > this specfic case. > > This works: > sh -c "ssh -i c:/keys/id_foo [EMAIL PROTECTED] 'ls -l /opt/'" > > However, putting this into a java class for instance will cause this > to > hang: > > > import java.io.*; > > public class test { >public static void main(String[] args) { > try { > final String cmd = "/bin/ssh -p 22 -i c:/keys/id_foo [EMAIL > PROTECTED] 'ls -l /opt'"; > final Process p = Runtime.getRuntime().exec(new String[] { > "sh", "-c", cmd > }); > final InputStreamReader isr = new InputStreamReader(p.getInputStream()); > final BufferedReader br = new BufferedReader(isr); > String line; > final StringBuffer sb = new StringBuffer(0); > while((line = br.readLine()) != null) { > sb.append(line); > sb.append('\n'); > } > System.out.println(sb.toString()); > } > catch (Exception e) { > System.out.println(e.getMessage()); > } >} > } > > > Is there a solution to this problem? It's usually recommended to invoke remote commands that don't require input with the "-n" ssh flag, which will close stdin -- try that. If it doesn't help, this could be the problem with the new pipe code that's been mentioned on this list -- search the web archives for "ssh hangs". HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
Re: 1.5.12: ssh hangs with Windows XP SP2
On Wed, 8 Dec 2004, Waiss, Garrett wrote: > Cygwin version: 1.5.12 > OS: Windows XP SP2 > > Before applying the SP2, ssh was working fine. Now ssh will hang with > this specfic case. > > This works: > sh -c "ssh -i c:/keys/id_foo [EMAIL PROTECTED] 'ls -l /opt/'" > > However, putting this into a java class for instance will cause this to > hang: > > > import java.io.*; > > public class test { >public static void main(String[] args) { > try { > final String cmd = "/bin/ssh -p 22 -i c:/keys/id_foo [EMAIL > PROTECTED] 'ls -l /opt'"; > final Process p = Runtime.getRuntime().exec(new String[] { > "sh", "-c", cmd > }); > final InputStreamReader isr = new > InputStreamReader(p.getInputStream()); > final BufferedReader br = new BufferedReader(isr); > String line; > final StringBuffer sb = new StringBuffer(0); > while((line = br.readLine()) != null) { > sb.append(line); > sb.append('\n'); > } > System.out.println(sb.toString()); > } > catch (Exception e) { > System.out.println(e.getMessage()); > } >} > } > > > Is there a solution to this problem? It's usually recommended to invoke remote commands that don't require input with the "-n" ssh flag, which will close stdin -- try that. If it doesn't help, this could be the problem with the new pipe code that's been mentioned on this list -- search the web archives for "ssh hangs". HTH, Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_[EMAIL PROTECTED] ZZZzz /,`.-'`'-. ;-;;,_[EMAIL PROTECTED] |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
1.5.12: ssh hangs with Windows XP SP2
Cygwin version: 1.5.12 OS: Windows XP SP2 Before applying the SP2, ssh was working fine. Now ssh will hang with this specfic case. This works: sh -c "ssh -i c:/keys/id_foo [EMAIL PROTECTED] 'ls -l /opt/'" However, putting this into a java class for instance will cause this to hang: import java.io.*; public class test { public static void main(String[] args) { try { final String cmd = "/bin/ssh -p 22 -i c:/keys/id_foo [EMAIL PROTECTED] 'ls -l /opt'"; final Process p = Runtime.getRuntime().exec(new String[] { "sh", "-c", cmd }); final InputStreamReader isr = new InputStreamReader(p.getInputStream()); final BufferedReader br = new BufferedReader(isr); String line; final StringBuffer sb = new StringBuffer(0); while((line = br.readLine()) != null) { sb.append(line); sb.append('\n'); } System.out.println(sb.toString()); } catch (Exception e) { System.out.println(e.getMessage()); } } } Is there a solution to this problem? thx for your time. Garrett Waiss cygcheck.out Description: cygcheck.out -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/