HyperCon SSH does not work with Java 1.7.0_80 (64bit)

  • So some more tests. I see in your code you are sending 10000 time out. These errors always return after exactly 10 seconds.


    If I change the IP to some random non-used IP on the network, I do see a Timeout prompt suggesting 'Wrong ip?'.


    But if I use the correct IP, either with correct login details, or wrong username, or no password but right username, I always get the exception thrown.

    • Offizieller Beitrag

    I have no external software installed for antivirus or firewall, just whatever is with Windows 10..


    Windows Firewall is enabled by default but since it works with Putty it should work with HyperCon as well unless it specifically blocks the java process, weird issue indeed as I'm using the same setup only with Kaspersky Total Security and with Windows Defender and Windows Firewall both disabled.

  • So how to diagnose the specific issue? It's making a connection right, which is why it isn't throwing the timeout.


    Should I try reinstalling something else onto this rPi 1 and see if that helps matters? Whats the preferred software to use?


    And can we please try a version with a longer timeout.. It takes 12 seconds for password prompt to appear in putty ssh window when auto sending username..

    • Offizieller Beitrag

    And can we please try a version with a longer timeout.. It takes 12 seconds for password prompt to appear in putty ssh window when auto sending username..


    That one sounds familiar and might be the root cause, that is normally because it tries to do a reverse DNS lookup or has some sort of external auth but typically it's the DNS one.
    Could you do the following:


    - SSH to Raspberry Pi and execute command "ifconfig" , afterwards best to post output.
    - Disable reverse DNS for ssh, more info here:


    http://raspberrypi.stackexchan…spberry-pi-ssh-login-slow


    but the steps are:


    - sudo nano -w /etc/ssh/sshd_config
    - add UseDNS no to the file and save with F2
    - run "service ssh reload"

  • Here is the output



    Regarding editing the file. sudo nano -w /etc/ssh/sshd_config gives error no sudo. If I try to edit the file with nano it says error writing, read only file. PS, there was a line already UseDNS yes but it was already commented out with #.

  • su doesn't do anything.


    This is openelec, not raspbian right? it would seem root account doesn't have write permission to the file.


    BTW, do you know how to compile this hypercon java program? I installed jdk and try to use javac on my modified PiSshConnection.java file but I get it to compile into class file?

    • Offizieller Beitrag

    Oh nevermind got the 2 swapped, everything is run as root with OpenElec but might be that ssh config is write protect by root as well :)


    Will check if there's a way around that.



    // Update


    With OpenElec you only get write access to /storage so there's a way to change the ssh config but it's not very clean (swapping out config on startup), there's a DNS issue with the router or the Raspberry at least as it shouldn't take that long to do a reverse lookup :)


    In the file "/etc/hostname" does it have the default hostname or one with a FQDN?
    Also in /etc/resolve.config /etc/resolve.conf which DNS server is it using?

  • in /etc/hostname the file is blank except for one entry:


    Code
    rPI


    I don't have resolve.config but have a resolv.conf. This says:


    Code
    # Generated by Connection Manager
    search Home
    nameserver 192.168.1.254


    That is my routers address.

  • OK, wait, the Java JVM is flagged specifically in the windows firewall, so if the first time you ever launched Java on this machine if you didn't specifically specify YES to firewall access, then no java application will have network access. This has been a common support issue with java apps.


    Just to confirm if this is or is not the issue, go to Control Panel, Windows Firewall, then select the option to "Turn Windows Firewall on or off", then turn it off for Private Network. Then try again.


    This will confirm if the issue is related specifically to the Java JVM firewall settings. If it worked, then you can either choose to leave it off for private networks (this is how I run) or choose "Advanced Settings", deleted any reference to "Java(TM) Platform" (under inbound, outbound, and rules), then try again (which should trigger the prompt to allow).

  • Oh man. So I eventually got eclipse installed and downloaded the source.


    hypercon/ConfigTool/src/org/hyperion/ssh/PiSshConnection.java


    Code
    public void connect(String pHostName, int pTcpPort, String pUsername, String pPassword) throws JSchException {
    connect( pHostName, pTcpPort, pUsername, pPassword, 10000);


    becomes


    Code
    public void connect(String pHostName, int pTcpPort, String pUsername, String pPassword) throws JSchException {
    connect( pHostName, pTcpPort, pUsername, pPassword, 20000);


    and it now connects (although it takes around 14 seconds).. Can you please make the timeout configurable or increase the timeout as above.

  • Can you compile it? Today is my first day looking at java before :) I can't figure out how to build the project to a jar, only run it from inside eclipse..


    Also, surely there is some exception or condition not being captured here. If it does not establish connection before timeout then we trigger timeout error, but if connection is established but not completed within the timeout, it shouldn't just bail out right..


    Rick,


    I commented out the search line but it hasn't improved login time. Its weird, launching putty I see username prompt in like 1 second, but after entering username, its then a further 12 seconds or so until the password prompt is displayed.

  • I still believe the Windows Firewall is the root cause here. It is probably blocking the reverse lookup packets. I too am using OpenELEC, and my resolv.conf is configured to use my primary router, and I don't get the 12 second delay that is mentioned, but then I have Firewall turned off for Private network.


    Can you try to turn off the Firewall for private network, just to remove this as a possible root cause?

  • So need to find a way of editing the non-editable file :)


    BTW as a bug report, if you maintain a 'Bottom Gap' in Hypercon, it is impossible to navigate back to zero gap. Even if setting to 0, it maintains a gap.


    How to turn off for private network? Java is already maintained in the firewall with no restrictions and I can't create a rule against a non .exe like Hypercon.

    • Offizieller Beitrag

    How to turn off for private network? Java is already maintained in the firewall with no restrictions and I can't create a rule against a non .exe like Hypercon.


    For testing only the easiest way is via control panel:


    "

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne Ihre Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklären Sie sich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.


    Other option is to stop the service completely:


    - Open command prompt
    - type "services.msc"
    - Find the service "Windows Firewall" and right click and select "Stop"

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!