aarthit 2014 | 30 May 08:39 2014
Picon

Fwd: Session hang when connected with openSSH

Hi ,

Thanks for the reply, when we added debugs we saw that the code hit
the part in this read function call on reaching the read call the
session freezes.

The value rmpzize we understand that is a value that comes from the
ssh server. we confirmed this by testing with different ssh servers.
The values were
OpenSSH server  32760
libSSH server 34902

This is not specific to a particular server. when we verified in 2
different servers we saw the same issue of session hang in the read
call .
when we change the value of this rmpsize starting from 1000 to 26608
for libssh server the session was working fine. which implies that the
client is not able to handle the size received from the SSH server.
But as per the RFC that we had already quoted the size obtained from
Openssh and libssh are also valid (32760 and 34902). Even they are
valid when the Jsch does a java read call it is not handling the
rmpsize properly. we suspect the issue with the java implementation.

Kindly share your thoughts.

Thanks
Aarthi

On Thu, May 22, 2014 at 11:16 AM, Atsuhiko Yamanaka <ymnk@...> wrote:
>
(Continue reading)

laogao | 19 May 19:09 2014
Picon

Could ChannelSftp.LsEntry be declared static

Hi,

It seems (as of version 0.1.51) the inner class LsEntry is declared as "public class LsEntry" inside ChannelSftp. I believe there is a subtle difference between inner (non-static) classes and nested (static) classes, which is causing me some headaches using JSch e.g. from Scala (could be circumvented but the code looks weird). I'm wondering if this LsEntry could be declared static, i.e. as nested (static) class, since it doesn't seem to require (or depend on) concrete instances of the enclosing class (ChannelSftp). Or is there something I blindly overlooked?

Thanks,
laogao


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
JSch-users mailing list
JSch-users@...
https://lists.sourceforge.net/lists/listinfo/jsch-users
Elise Atkins | 13 May 17:51 2014

SFTP Performance

I have been using jsch's sftp functions to get directory listings on a 
server in the same subnet. I have noticed that when the number of files 
is large the directory listing can take longer then expected. As an 
example if the number of files is 15,000 it can take 8-10 seconds to 
return the listing. In addition just doing a listing with a filename (no 
wildcards)  takes almost the same amount of time.

Have you seen this behavior before and is there a solution to improve 
the speed when a directory contains a large number of files?

Elise

------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
Alan Ezust | 9 May 21:01 2014
Picon

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:
&#149; 3 signs your SCM is hindering your productivity
&#149; Requirements for releasing software faster
&#149; Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
Danisment Gazi Unal | 22 Apr 09:50 2014

is SO_REUSEADDR risk handled by SSH protocol ?


Hello!

I've a fix port to bind. But, I want to rebind this port even if it's in
TIME_WAIT state. So, I want to use Socket.setReuseAddress(true).

But, when enabled SO_REUSEADDR, as mentioned at
http://developerweb.net/viewtopic.php?id=2941, there is a risk that new
connection using same server,serverport,client,clientport TCP tuple may
receive network packet from old connection. does SSH protocol handle this
confusion ?

As a result, I am asking that can I use Socket.setReuseAddress(true) safely
in SSH connections ?

thanks.

------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Danisment Gazi Unal | 19 Apr 19:35 2014

How to get Socket used in Session ?


Hello!

I'm trying to use com.jcraft.jsch.SocketFactory() to create Socket. I need
to get Socket. I add getSocket() as below:

public class SSHSocketFactory implements com.jcraft.jsch.SocketFactory {

    private SSHSocket gSocket = null;

    public synchronized Socket createSocket(String host, int port) throws
IOException, UnknownHostException {

        gSocket = new SSHSocket(host, port);
        return gSocket;
    }

.....

    public SSHSocket getSocket() {

        return gSocket;
    }
}

If the same socket factory is called multiple times(including by Jsch
internally too), then It always returns the last socket.

I guess I need a method like createSocket(id,host,port) to get it by
getSocket(id).

How can I safely get Socket created by specic host,port pair ?

thanks in advance...

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
Josh Clum | 17 Apr 17:21 2014
Picon

Jsch Client UserAuthGss

Hi,

I'm setting up a test with the jsch client and an apache mina server to use gss authentication. It looks like there is some protocal confusion with the messages being sent. Are the versioning problems(kerberos, gssapi) that I might incur when trying to use the jsch client to connect via userauthgss?

On the client side I'm getting:

java.net.SocketTimeoutException: Read timed out

On the server side this is my session start to finish:

11:08:08,876 DEBUG [KerberosProtocolHandler] (KerberosProtocolHandler.java:91) /10.128.88.132:55448 CREATED:  socket
11:08:08,877 DEBUG [KERBEROS_LOG] (KerberosProtocolHandler.java:96) /10.128.88.132:55448 CREATED:  socket
11:08:08,877 DEBUG [KerberosProtocolHandler] (KerberosProtocolHandler.java:108) /10.128.88.132:55448 OPENED
11:08:08,877 DEBUG [KERBEROS_LOG] (KerberosProtocolHandler.java:113) /10.128.88.132:55448 OPENED
11:08:08,877 DEBUG [ProtocolCodecFilter] (ProtocolCodecFilter.java:211) Processing a MESSAGE_RECEIVED for session 6
11:08:54,898 DEBUG [Asn1Decoder] (Asn1Decoder.java:671) >>>==========================================
11:08:54,899 DEBUG [Asn1Decoder] (Asn1Decoder.java:672) --> Decoding a PDU
11:08:54,899 DEBUG [Asn1Decoder] (Asn1Decoder.java:673) >>>------------------------------------------
11:08:54,900 DEBUG [Asn1Decoder] (Asn1Decoder.java:680) --- State = TAG_STATE_START ---
11:08:54,901 DEBUG [Asn1Decoder] (Asn1Decoder.java:686)   current byte : 0x32
11:08:54,901 DEBUG [Asn1Decoder] (Asn1Decoder.java:108) Tag 0x32 has been decoded
11:08:54,901 DEBUG [Asn1Decoder] (Asn1Decoder.java:680) --- State = LENGTH_STATE_START ---
11:08:54,902 DEBUG [Asn1Decoder] (Asn1Decoder.java:686)   current byte : 0x2E
11:08:54,902 DEBUG [Asn1Decoder] (Asn1Decoder.java:680) --- State = LENGTH_STATE_END ---
11:08:54,902 DEBUG [Asn1Decoder] (Asn1Decoder.java:686)   current byte : 0x30
11:08:54,903 DEBUG [Asn1Decoder] (Asn1Decoder.java:360) Parent length : TLV expected length stack :  - null
11:08:54,903 DEBUG [Asn1Decoder] (Asn1Decoder.java:372) Root TLV[46]
11:08:54,903 DEBUG [Asn1Decoder] (Asn1Decoder.java:480) Length 46 has been decoded
11:08:54,903 DEBUG [Asn1Decoder] (Asn1Decoder.java:680) --- State = VALUE_STATE_START ---
11:08:54,904 DEBUG [Asn1Decoder] (Asn1Decoder.java:686)   current byte : 0x30
11:08:54,904 DEBUG [Asn1Decoder] (Asn1Decoder.java:758) <<<------------------------------------------
11:08:54,905 DEBUG [Asn1Decoder] (Asn1Decoder.java:775) <-- End decoding : TLV[ 0x32, 46, DATA[0x30 0x2D 0x4A 0x53 0x43 0x48 0x2D 0x30 0x2E 0x31 0x2E 0x35 0x31 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ]]
11:08:54,905 DEBUG [Asn1Decoder] (Asn1Decoder.java:783) <<<==========================================
11:10:23,724 ERROR [KerberosProtocolHandler] (KerberosProtocolHandler.java:157) /10.128.88.132:55448 EXCEPTION
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.IllegalArgumentException: message (Hexdump: 53 53 48 2D 32 2E 30 2D 4A 53 43 48 2D 30 2E 31 2E 35 31 0A)
  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:242)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
  at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
  at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.IllegalArgumentException: message
  at org.apache.mina.filter.codec.AbstractProtocolDecoderOutput.write(AbstractProtocolDecoderOutput.java:43)
  at org.apache.directory.server.kerberos.protocol.codec.MinaKerberosDecoder.decode(MinaKerberosDecoder.java:65)
  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:232)
  ... 15 more
11:10:23,726 ERROR [KERBEROS_LOG] (KerberosProtocolHandler.java:158) /10.128.88.132:55448 EXCEPTION
org.apache.mina.filter.codec.ProtocolDecoderException: java.lang.IllegalArgumentException: message (Hexdump: 53 53 48 2D 32 2E 30 2D 4A 53 43 48 2D 30 2E 31 2E 35 31 0A)
  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:242)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:47)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:765)
  at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:109)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:417)
  at org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:410)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:710)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:664)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:653)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor.access$600(AbstractPollingIoProcessor.java:67)
  at org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:1124)
  at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
  at java.lang.Thread.run(Thread.java:695)
Caused by: java.lang.IllegalArgumentException: message
  at org.apache.mina.filter.codec.AbstractProtocolDecoderOutput.write(AbstractProtocolDecoderOutput.java:43)
  at org.apache.directory.server.kerberos.protocol.codec.MinaKerberosDecoder.decode(MinaKerberosDecoder.java:65)
  at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:232)
  ... 15 more
11:10:23,727 DEBUG [KerberosProtocolHandler] (KerberosProtocolHandler.java:125) /10.128.88.132:55448 CLOSED
11:10:23,727 DEBUG [KERBEROS_LOG] (KerberosProtocolHandler.java:130) /10.128.88.132:55448 CLOSED

Thanks,
Josh
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
JSch-users mailing list
JSch-users@...
https://lists.sourceforge.net/lists/listinfo/jsch-users
Chathuri Wimalasena | 17 Apr 16:40 2014
Picon

Using cached login.conf when creating the session

Hi Devs, 

We are using  JSch to connect to a host using kerberos ticket. In our case, we have to support multiple user login. We are generating kerberos ticket using apache mod_auth_kerb and use that ticket in login.conf file and create a session when connecting to that server. It seems everything works fine for single user mode, but when it comes to multiple user mode, it uses session in the cache. We update the login.conf file for each user. But it seems when the session is created, it uses previous user's login.conf file to create the session. 

Any idea why this is happening and any recommendations to get rid of this ? Appreciate your help on this.

Thanks..
Chathuri
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
JSch-users mailing list
JSch-users@...
https://lists.sourceforge.net/lists/listinfo/jsch-users
Sachith Withana | 14 Apr 20:40 2014
Picon

SocketTimeoutException in connecting to the KDC

Hi all,

can someone please explain to me what would cause this error?
The client tries to connect to the server and it times out.

here's the pastebin link for the full stack trace: http://pastebin.com/5ywPfRpN
--
Thanks,
Sachith Withana

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
JSch-users mailing list
JSch-users@...
https://lists.sourceforge.net/lists/listinfo/jsch-users
aarthit 2014 | 10 Apr 15:28 2014
Picon

Session hang when connected with openSSH


Hi All,

 

We are using Jsch-0.1.51 for establishing SSH sessions with our product. We face the following issue:

          

The shell hangs and we are not able to enter any commands or text in the screen.

 

We tested the following scenarios and these are our observations:

 

S/No

OS/target

SSH version

SSH server stack

Result

1

Scientific Linux release 6.0

1.5

Openssh 5.3

SSH session establishment fails with the message “Invalid server’s version string”

2

Scientific Linux release 6.4

1.5

OpenSSH 5.3

SSH session establishment fails with the message “Invalid server’s version string”

3

Linux-CentOS release 5.5

2.0

OpenSSH 4.3

Authentication succeeds and  session gets established. The SSH shell prompt is also received.

The session freezes there and doesn’t work.

4

Scientific Linux 6.0

2.0

Libssh 0.6.1

Authentication succeeds and the session is established the shell prompt is also received but the session freezes.

 

For the above 1st 3 cases The establishment of the SSH session is not consistent ,out of 10 trials we could see only twice the session is getting established all the other attempts resulted in a failure.

 

The 4th case did not give us a successful session In any of the instances.

In the 1st two cases we changed the version to 2 and checked and in that we see the result that session gets established but freezes.

 

This problem of session hang is consistent when the client is run from a windows XP machine  running with java version like

java version "1.6.0_20" . java version "1.6.0_01" .

 

When run from a windows 7 PC with java version "1.6.0_22" we see out of 10 times we see 2 times the session gets established and other times it is not getting established.

 

 

Kindly let us know , why do we see the discrepancy in establishing the sessions. And most of the times we are not seeing a successful shell. Do we have to change any settings in the jsch config file. Or any other modifications has to be done. Kindly let us know if any solution is available for this and the reason for the above behavior

 

 

Thanks

Aarthi






------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
JSch-users mailing list
JSch-users@...
https://lists.sourceforge.net/lists/listinfo/jsch-users
Danisment Gazi Unal | 9 Apr 22:32 2014

How to connect to RMX agent over SSH without port forwarding ?


Hello!

I want to make RMX connection secured by SSH. But, I dont want to define a
local port and use a port forwarding.

There is a sample for mysql-JDBC at
http://sourceforge.net/p/jsch/mailman/message/30844955/ .

How can I do the same for RMX ?

Thanks in advance...

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees

Gmane