Denise, enviado desde mi dispositivo BlackBerry® proveído por Tigo. -----Original Message----- From: jsch-users-requ...@lists.sourceforge.net Date: Wed, 06 Mar 2013 15:02:25 To: <jsch-users@lists.sourceforge.net> Reply-To: jsch-users@lists.sourceforge.net Subject: JSch-users Digest, Vol 81, Issue 2
Send JSch-users mailing list submissions to jsch-users@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/jsch-users or, via email, send a message with subject or body 'help' to jsch-users-requ...@lists.sourceforge.net You can reach the person managing the list at jsch-users-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than "Re: Contents of JSch-users digest..." Today's Topics: 1. Not able to avoid the 'session is down' message (Don Campbell) 2. Not able to avoid the 'session is down' message (Don Campbell) 3. strange behavior on RedHat when setting pty to true (gal) ---------------------------------------------------------------------- Message: 1 Date: Wed, 6 Mar 2013 14:57:33 +0000 (UTC) From: Don Campbell <gal...@nycap.rr.com> Subject: [JSch-users] Not able to avoid the 'session is down' message To: jsch-users@lists.sourceforge.net Message-ID: <loom.20130306t154933-...@post.gmane.org> Content-Type: text/plain; charset=us-ascii Hi, I've tried different permutations of connecting first, then opening the channel; and the reverse. And some other modifications, but cannot get rid of the 'session is down' message. This happens whether I run it in Windows, or Linux. I confirmed that the host is available, with the given parameters. In the code below, the error happens at the chn_RezLife = session.openChannel( "exec" ); or chn_RezLife = session.openChannel( "shell" ); statement. Here's the code, watered-down: import com.jcraft.jsch.*; import java.io.FileInputStream; public class FileTransferSFTP { public static void main(String[] args) throws Exception { FileTransferSFTP sendftp = new FileTransferSFTP(); sendftp.SendSFTP(); } public void SendSFTP() { String sUserName = "cwhatthe"; String sPassword = "97whyyou"; int nPort = 22; String sKnownHostsFileName = "blahblah.blah.com"; String sSourcePath = ""; String sDestinationPath = ""; JSch jsch = new JSch(); Session session; FileInputStream fis_employeeList = null; Channel chn_WhatThe = null; String sSendCommand = ""; try { session = jsch.getSession( sUserName, sKnownHostsFileName, nPort ); session.setPassword((sPassword)); sSourcePath = "employeeList.csv"; System.out.println( "Set sSourcePath" ); // sDestinationPath = "/employeelists/employeeList.csv"; sDestinationPath = "/employeeListTest.csv"; System.out.println( "Ready to open channel" ); // chn_WhatThe = session.openChannel( "shell" ); chn_WhatThe = session.openChannel( "exec" ); System.out.println( "Opened shell channel" ); System.out.println( "Ready to connect" ); chn_WhatThe.connect(30000); System.out.println( "Connected" ); chn_WhatThe.setInputStream((null)); chn_WhatThe.getInputStream(); } catch( Exception e ) { System.out.println( e ); } } } ------------------------------ Message: 2 Date: Wed, 6 Mar 2013 14:55:31 +0000 (UTC) From: Don Campbell <gal...@nycap.rr.com> Subject: [JSch-users] Not able to avoid the 'session is down' message To: jsch-users@lists.sourceforge.net Message-ID: <loom.20130306t154933-...@post.gmane.org> Content-Type: text/plain; charset=us-ascii Hi, I've tried different permutations of connecting first, then opening the channel; and the reverse. And some other modifications, but cannot get rid of the 'session is down' message. This happens whether I run it in Windows, or Linux. I confirmed that the host is available, with the given parameters. In the code below, the error happens at the chn_RezLife = session.openChannel( "exec" ); or chn_RezLife = session.openChannel( "shell" ); statement. Here's the code, watered-down: import com.jcraft.jsch.*; import java.io.FileInputStream; public class FileTransferSFTP { public static void main(String[] args) throws Exception { FileTransferSFTP sendftp = new FileTransferSFTP(); sendftp.SendSFTP(); } public void SendSFTP() { String sUserName = "cwhatthe"; String sPassword = "97whyyou"; int nPort = 22; String sKnownHostsFileName = "blahblah.blah.com"; String sSourcePath = ""; String sDestinationPath = ""; JSch jsch = new JSch(); Session session; FileInputStream fis_employeeList = null; Channel chn_WhatThe = null; String sSendCommand = ""; try { session = jsch.getSession( sUserName, sKnownHostsFileName, nPort ); session.setPassword((sPassword)); sSourcePath = "employeeList.csv"; System.out.println( "Set sSourcePath" ); // sDestinationPath = "/employeelists/employeeList.csv"; sDestinationPath = "/employeeListTest.csv"; System.out.println( "Ready to open channel" ); // chn_WhatThe = session.openChannel( "shell" ); chn_WhatThe = session.openChannel( "exec" ); System.out.println( "Opened shell channel" ); System.out.println( "Ready to connect" ); chn_WhatThe.connect(30000); System.out.println( "Connected" ); chn_WhatThe.setInputStream((null)); chn_WhatThe.getInputStream(); } catch( Exception e ) { System.out.println( e ); } } } ------------------------------ Message: 3 Date: Wed, 6 Mar 2013 16:46:59 +0200 From: gal <g...@csl-int.com> Subject: [JSch-users] strange behavior on RedHat when setting pty to true To: <jsch-users@lists.sourceforge.net> Message-ID: <513756e3.6000...@csl-int.com> Content-Type: text/plain; charset="us-ascii" An HTML attachment was scrubbed... -------------- next part -------------- A non-text attachment was scrubbed... Name: image002.gif Type: image/gif Size: 4506 bytes Desc: not available ------------------------------ ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev ------------------------------ _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users End of JSch-users Digest, Vol 81, Issue 2 ***************************************** ------------------------------------------------------------------------------ Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the endpoint security space. For insight on selecting the right partner to tackle endpoint security challenges, access the full report. http://p.sf.net/sfu/symantec-dev2dev _______________________________________________ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users