[JSch-users] trying to set TERM=dumb on a terminal shell via ChannelShell interface
Hello everyone. I'm the author of the SshConsolePlugin for JEdit. I'm trying to do a channelShell.setEnv("TERM", "dumb"), so that I don't have to see all these funny vt100 characters in the console shell. It doesn't seem to work. I get this error whenever I try to set an environment variable. I get the following exception. Am I doing something wrong? I tried it first this way: // Hashtable env = new Hashtable(); // env.put("TERM", "dumb"); // channelShell.setEnv(env); And later I updated to the latest jsch and tried it this way. No difference channelShell.setEnv("TERM", "dumb"); 11:03:48 AM [AWT-EventQueue-0] [error] Connection: com.jcraft.jsch.JSchException: failed to send channel request 11:03:48 AM [AWT-EventQueue-0] [error] Connection: at com.jcraft.jsch.Request.write(Request.java:65) 11:03:48 AM [AWT-EventQueue-0] [error] Connection: at com.jcraft.jsch.RequestEnv.request(RequestEnv.java:52) 11:03:48 AM [AWT-EventQueue-0] [error] Connection: at com.jcraft.jsch.ChannelSession.sendRequests(ChannelSession.java:222) 11:03:48 AM [AWT-EventQueue-0] [error] Connection: at com.jcraft.jsch.ChannelShell.start(ChannelShell.java:44) 11:03:48 AM [AWT-EventQueue-0] [error] Connection: at com.jcraft.jsch.Channel.connect(Channel.java:200) - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
[JSch-users] com.jcraft.jsch.JSchException: Auth Cancel with Oracle Java 1.8
I am testing the jEdit (www.jedit.org) FTP plugin (1.1.0) against Java 1.8 for my first time. I am running into this "Auth Cancel" exception which only happens in Java 1.8 and not Java 1.7. Are there any ideas out there as to why this incompatibility might exist? It seems to me to be related to the jsch library (FTP 1.10 uses jsch 0.1.51) https://sourceforge.net/p/jedit/plugin-bugs/1787/#4c85 Any ideas would be appreciated. thanks! --Alan -- Is your legacy SCM system holding you back? Join Perforce May 7 to find out: • 3 signs your SCM is hindering your productivity • Requirements for releasing software faster • Expert tips and advice for migrating your SCM now http://p.sf.net/sfu/perforce ___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
Re: [JSch-users] Jsch stopped working with Java8
I am also having trouble using jsch with java8. I already posted my problem to this list earlier. Basically, the jEdit FTP plugin doesn't work for me in Java 8. But your problem is different, and one I might be able to help you with. you may need to install the JCE full key-strength encryption. http://stackoverflow.com/questions/6481627/java-security-illegal-key-size-or-default-parameters On Mon, Jul 28, 2014 at 9:18 AM, Marc Logemann wrote: > Hi, > > we are using JSch as transport mechanism for EDI data to a different > company for about 7 years now. Today we upgraded to Java 8 and now when we > try to connect, we get: > > Session.connect: java.security.InvalidKeyException: Key is too long for > this algorithm > > Currently we use: > > > > Our code is like this.. > > Session session = jsch.getSession(sftpUser, sftpHost); > session.setPassword(sftpPassword); > UserInfo ui = new SFTPClientWrapper.MyUserInfo(); > session.setUserInfo(ui); > session.connect(); > > > So some questions arise :-) > > 1) will upgrade to latest version of JSch help me? > > 2) do you know the error in general? I dont have any clue because i dont > do anything with keys. IMO its some kind of internal issue with java and > JSch. > > > Thanks for any hints. > > Marc > > > -- > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > ___ > JSch-users mailing list > JSch-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jsch-users > > -- Infragistics Professional Build stunning WinForms apps today! Reboot your WinForms applications with our WinForms controls. Build a bridge from your legacy apps to the future. http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
Re: [JSch-users] PassPhrase for privateKey fail
I have noticed this too. http://sourceforge.net/p/jedit/plugin-bugs/1726/ And in another case, I got "Auth Cancel". http://sourceforge.net/p/jedit/plugin-bugs/1787/ First, double-check you have JCE unlimited key strength encryption installed. But if you do and still have this problem, I believe some very old SSH keys can not be read by java 1.8+jsch due to new restrictions in crypto. For example, 2048-bit DSA keys can't be created anymore from current versions of ssh-keygen but are still recognized by older ssh clients. And also by jsch + Java 1.7. However, in my experience, once you start using Java 1.8, some of those old keys have to be regenned with more current versions of ssh-keygen. On Thu, Dec 18, 2014 at 3:33 AM, sodiska saw wrote: > > Hi, > > I have downloaded Jsch version 1.51 and started to using it to connect > a remote server using private key which has passphrase. Funny thing is when > I use the private key and with the passphrase via a Terminal, it works > fine, but when I use a JAVA app that I wrote, it keep asking me to key in > passphrase for 3 times, and then reply error message: Auth Fail. > > I am pretty sure the private key and the passphrase is correct since I > have tested it in a terminal. Anyone has the same experience? > > > > > > -- > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server > from Actuate! Instantly Supercharge Your Business Reports and Dashboards > with Interactivity, Sharing, Native Excel Exports, App Integration & more > Get technology previously reserved for billion-dollar corporations, FREE > > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk > ___ > JSch-users mailing list > JSch-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jsch-users > > -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
[JSch-users] making SSH secure again
Thought this article might be of interest. https://stribika.github.io/2015/01/04/secure-secure-shell.html -- Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net ___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
[JSch-users] "timeout in wating for rekeying process"
Anyone ever get this? I see it in the logs for a jEdit user, but i have not seen it myself. The full stack trace can be seen here: https://gist.github.com/lbtc-xxx/e32bb695572ec322ae31 It is a strange error for 2 reasons. 1. misspelling "waiting" as "wating" 2. the timeout happens immediately and does not seem like a timeout. Is there a public repository where I can do a git clone or svn checkout of the jsch source? I am having trouble getting the sourcecode archives from sourceforge today. --Alan -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users
Re: [JSch-users] SFTP of large file hangs
Just wondering, is the client running jsch also running a 64 bit version of Java? On Mon, Oct 3, 2016 at 12:19 PM, Vikas Verma wrote: > Can anyone please help? The SFTP server is proftpd. This looks like an > old Rekeying problem between Proftpd and Jsch. I have tried JSCH version > 50/51 and 54 with no luck. > > > Thanks, > > Vikas. > -- > *From:* Vikas Verma > *Sent:* Wednesday, September 14, 2016 11:43:16 AM > *To:* jsch-users@lists.sourceforge.net > *Subject:* SFTP of large file hangs > > > We are having a strange issue with one of our clients (Client hosts the > SFTP server. We are the client using JSCH). When we SFTP a large file to > their SFTP server the file stops getting uploaded after exactly 2143990632 > bytes. The JSCH connection just starts over at that point. I am including > the logs. Has anyone seen this behavior before? I can use any other SFTP > client with that server and they work. > > In the logs you will see that after my custom log prints (3 and 4) it > starts putting the file. After sending 2143990632 bytes it kind of starts > over and the highlighted log shows up. The file at that point does not > "grow" in size on the server side. > > Help truly appreciated !! > > Thanks, > Vikas. > > > INFO: Connecting to xxx.xxx.xxx.xx port 22 > INFO: Connection established > INFO: Remote version string: SSH-2.0-mod_sftp/0.9.7 > INFO: Local version string: SSH-2.0-JSCH-0.1.53 > INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128- > ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour, > arcfour128,arcfour256 > INFO: aes256-ctr is not available. > INFO: aes192-ctr is not available. > INFO: aes256-cbc is not available. > INFO: aes192-cbc is not available. > INFO: CheckKexes: diffie-hellman-group14-sha1, > ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 > INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2- > nistp521 > INFO: SSH_MSG_KEXINIT sent > INFO: SSH_MSG_KEXINIT received > INFO: kex: server: diffie-hellman-group-exchange- > sha256,diffie-hellman-group-exchange-sha1,diffie-hellman- > group14-sha1,diffie-hellman-group1-sha1,rsa1024-sha1 > INFO: kex: server: ssh-rsa,ssh-dss > INFO: kex: server: aes256-ctr,aes192-ctr,aes128- > ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,cast128-cbc, > arcfour256,arcfour128,3des-ctr,3des-cbc > INFO: kex: server: aes256-ctr,aes192-ctr,aes128- > ctr,aes128-cbc,blowfish-ctr,blowfish-cbc,cast128-cbc, > arcfour256,arcfour128,3des-ctr,3des-cbc > INFO: kex: server: hmac-sha1,hmac-sha1-96,hmac- > md5,hmac-md5-96,hmac-ripemd160 > INFO: kex: server: hmac-sha1,hmac-sha1-96,hmac- > md5,hmac-md5-96,hmac-ripemd160 > INFO: kex: server: z...@openssh.com,zlib,none > INFO: kex: server: z...@openssh.com,zlib,none > INFO: kex: server: > INFO: kex: server: > INFO: kex: client: ecdh-sha2-nistp256,ecdh-sha2- > nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1, > diffie-hellman-group-exchange-sha256,diffie-hellman-group- > exchange-sha1,diffie-hellman-group1-sha1 > INFO: kex: client: ssh-rsa,ssh-dss,ecdsa-sha2- > nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521 > INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc > INFO: kex: client: aes128-ctr,aes128-cbc,3des-ctr,3des-cbc,blowfish-cbc > INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2- > 256,hmac-sha1-96,hmac-md5-96 > INFO: kex: client: hmac-md5,hmac-sha1,hmac-sha2- > 256,hmac-sha1-96,hmac-md5-96 > INFO: kex: client: none > INFO: kex: client: none > INFO: kex: client: > INFO: kex: client: > INFO: kex: server->client aes128-ctr hmac-md5 none > INFO: kex: client->server aes128-ctr hmac-md5 none > INFO: SSH_MSG_KEXDH_INIT sent > INFO: expecting SSH_MSG_KEXDH_REPLY > INFO: ssh_rsa_verify: signature true > WARN: Permanently added 'xxx.xxx.xxx.xx' (RSA) to the list of known hosts. > INFO: SSH_MSG_NEWKEYS sent > INFO: SSH_MSG_NEWKEYS received > INFO: SSH_MSG_SERVICE_REQUEST sent > INFO: SSH_MSG_SERVICE_ACCEPT received > INFO: Authentications that can continue: publickey,keyboard- > interactive,password > INFO: Next authentication method: publickey > INFO: Authentications that can continue: password > INFO: Next authentication method: password > INFO: Authentication succeeded (password). > ---3 > ---4 > INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128- > ctr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour, > arcfour128,arcfour256 > INFO: aes256-ctr is not available. > INFO: aes192-ctr is not available. > INFO: aes256-cbc is not available. > INFO: aes192-cbc is not available. > INFO: CheckKexes: diffie-hellman-group14-sha1, > ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 > INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2- > nistp521 > INFO: SSH_MSG_KEXINIT sent > INFO: kex: server: diffie-hellman-group-exchange- > sha256,diffie-hellman-group-exchange-sha1,diffie-hellman- > group14-sha1,diffie-hellman-group1-sha1,rsa1024-sha1 > INFO: kex: server: ssh-rsa,ssh-d
Re: [JSch-users] SFTP of large file hangs
Another guess: investigate what the startup command line options are for java on the system in question. Is the max heap size limited with an -Xmx option? Or is there a -d32 being passed in? On Mon, Oct 10, 2016 at 8:26 AM, Vikas Verma wrote: > I was able to reproduce this in our local environment. We were able to > setup ProFTPD SFTP server with default settings. After transferring about > 2GB of data (using jsch) the transfer stops. I am attaching the ProFTPD > logs for reference. Please help. > > > Thanks, > > Vikas. > -- > *From:* Vikas Verma > *Sent:* Wednesday, October 5, 2016 11:40:47 AM > *To:* Alan Ezust > > *Cc:* jsch-users@lists.sourceforge.net > *Subject:* Re: [JSch-users] SFTP of large file hangs > > > @Alan --> Yes its running 64 bit. > > @Lothar --> The problem is just between Proftpd and JSCH. I am able to > transfer huge files (> 4gb) to other SFTP servers from JSCH. And Proftpd > works fine with other ssh clients (like the one that comes with linux). I > am not sure sure about their (Partner that hosts sftp server) logging. I > can reach out and ask. But their support isnt that great. > > > Thanks, > > Vikas. > -- > *From:* Alan Ezust > *Sent:* Wednesday, October 5, 2016 11:00:44 AM > *To:* Vikas Verma > *Cc:* jsch-users@lists.sourceforge.net > *Subject:* Re: [JSch-users] SFTP of large file hangs > > Just wondering, is the client running jsch also running a 64 bit version > of Java? > > > On Mon, Oct 3, 2016 at 12:19 PM, Vikas Verma wrote: > >> Can anyone please help? The SFTP server is proftpd. This looks like an >> old Rekeying problem between Proftpd and Jsch. I have tried JSCH version >> 50/51 and 54 with no luck. >> >> >> Thanks, >> >> Vikas. >> -- >> *From:* Vikas Verma >> *Sent:* Wednesday, September 14, 2016 11:43:16 AM >> *To:* jsch-users@lists.sourceforge.net >> *Subject:* SFTP of large file hangs >> >> >> We are having a strange issue with one of our clients (Client hosts the >> SFTP server. We are the client using JSCH). When we SFTP a large file to >> their SFTP server the file stops getting uploaded after exactly >> 2143990632 bytes. The JSCH connection just starts over at that point. I >> am including the logs. Has anyone seen this behavior before? I can use any >> other SFTP client with that server and they work. >> >> In the logs you will see that after my custom log prints (3 and 4) it >> starts putting the file. After sending 2143990632 bytes it kind of >> starts over and the highlighted log shows up. The file at that point does >> not "grow" in size on the server side. >> >> Help truly appreciated !! >> >> Thanks, >> Vikas. >> >> >> INFO: Connecting to xxx.xxx.xxx.xx port 22 >> INFO: Connection established >> INFO: Remote version string: SSH-2.0-mod_sftp/0.9.7 >> INFO: Local version string: SSH-2.0-JSCH-0.1.53 >> INFO: CheckCiphers: aes256-ctr,aes192-ctr,aes128-c >> tr,aes256-cbc,aes192-cbc,aes128-cbc,3des-ctr,arcfour,arcfour >> 128,arcfour256 >> INFO: aes256-ctr is not available. >> INFO: aes192-ctr is not available. >> INFO: aes256-cbc is not available. >> INFO: aes192-cbc is not available. >> INFO: CheckKexes: diffie-hellman-group14-sha1,ec >> dh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521 >> INFO: CheckSignatures: ecdsa-sha2-nistp256,ecdsa-sha2 >> -nistp384,ecdsa-sha2-nistp521 >> INFO: SSH_MSG_KEXINIT sent >> INFO: SSH_MSG_KEXINIT received >> INFO: kex: server: diffie-hellman-group-exchange- >> sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-gro >> up14-sha1,diffie-hellman-group1-sha1,rsa1024-sha1 >> INFO: kex: server: ssh-rsa,ssh-dss >> INFO: kex: server: aes256-ctr,aes192-ctr,aes128-c >> tr,aes128-cbc,blowfish-ctr,blowfish-cbc,cast128-cbc,arcfour2 >> 56,arcfour128,3des-ctr,3des-cbc >> INFO: kex: server: aes256-ctr,aes192-ctr,aes128-c >> tr,aes128-cbc,blowfish-ctr,blowfish-cbc,cast128-cbc,arcfour2 >> 56,arcfour128,3des-ctr,3des-cbc >> INFO: kex: server: hmac-sha1,hmac-sha1-96,hmac-md >> 5,hmac-md5-96,hmac-ripemd160 >> INFO: kex: server: hmac-sha1,hmac-sha1-96,hmac-md >> 5,hmac-md5-96,hmac-ripemd160 >> INFO: kex: server: z...@openssh.com,zlib,none >> INFO: kex: server: z...@openssh.com,zlib,none >> INFO: kex: server: >> INFO: kex: server: >> INFO: kex: client: ecdh-sha2-nistp256,ecdh-sha2-n >> istp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffi >> e-hellman-group-exchange-sha256,
Re: [JSch-users] SFTP of large file hangs
I had to google to figure out what "rekeying" means and came across this interesting thread about a similar problem the paramiko client used to have at 1gb. https://github.com/paramiko/paramiko/issues/49 -- Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot___ JSch-users mailing list JSch-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jsch-users