Kitz ADSL Broadband Information
adsl spacer  
Support this site
Home Broadband ISPs Tech Routers Wiki Forum
 
     
   Compare ISP   Rate your ISP
 
Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: 1 [2] 3

Author Topic: Can DSLstats use SSH instead of Telnet?  (Read 2886 times)

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #15 on: August 07, 2017, 03:54:36 PM »

Thanks again John. No, I won't be trying to install any ssh library, there are far too many target systems to take into account.
Logged
  Eric

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #16 on: August 08, 2017, 04:40:03 PM »

I've sorted out manual logging in, and I could reproduce this in DSLstats. Unfortunately, having done this a few times I'm now locked out of SSH access to the modem, so it looks as though the Zyxel firmware has a built in limit for the number of repeated SSH connections. This will make SSH unusable in DSLstats unless I can find a way of disabling the limit.
Logged
  Eric

NewtronStar

  • Kitizen
  • ****
  • Posts: 4691
Re: Can DSLstats use SSH instead of Telnet?
« Reply #17 on: August 08, 2017, 05:16:28 PM »

Found this to be also true at my end you can't even have two ssh sessions open at once from different devices as it knocks out a session until the other is closed, thanks for looking into this I am guessing the ZyXEL only allows one TELNET session and one SHH session open at the same time.
« Last Edit: August 08, 2017, 05:44:12 PM by NewtronStar »
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #18 on: August 08, 2017, 06:20:21 PM »

I wasn't actually talking about simultaneous connections. I was talking about logging in, disconnecting, logging in again, as DSLstats does. With my modem, I can only do this a few times before it locks me out.
Logged
  Eric

d2d4j

  • Reg Member
  • ***
  • Posts: 551
Re: Can DSLstats use SSH instead of Telnet?
« Reply #19 on: August 08, 2017, 06:22:01 PM »

Hi

I hope you don't mind but why do you need to make repeated connections.

I'm sorry I do not understand why but I may have thought just make 1 connection, then send a keepalive command such as ? (Display help) sat every 2 minutes so the connection is live or add the logout command 

I hope you don't mind my thoughts

Many thanks

John
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #20 on: August 08, 2017, 06:43:06 PM »

DSLstats logs in only for the time it takes to collect the data, then it disconnects until the next sample is due. Staying logged in would involve quite a lot of redesign, and would also lock out HG612_Modem_Stats with those modems which only allow a single telnet login. I'm thinking about it again now.
Logged
  Eric

d2d4j

  • Reg Member
  • ***
  • Posts: 551
Re: Can DSLstats use SSH instead of Telnet?
« Reply #21 on: August 08, 2017, 06:46:48 PM »

Hi roseway

Many thanks, much appreciated

Sorry I did not understand sorry but kudos to you

Many thanks

John
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #22 on: August 08, 2017, 06:50:06 PM »

I've regained SSH access after about 2 hours, so it may be practical to enable a permanent SSH connection which won't conflict with HG612_Modem_Stats. Please understand that I'm outside my comfort zone here, so it will take some time.
Logged
  Eric

NewtronStar

  • Kitizen
  • ****
  • Posts: 4691
Re: Can DSLstats use SSH instead of Telnet?
« Reply #23 on: August 08, 2017, 07:09:21 PM »

Hi d2d4j i'll give you and example have DSLstats collecting stats via telenet on RPI and it sends to MDWS now let say I want to also run DSLstats from the PC via telnet no upload to MDWS the RPI telnet session will stop with ZyXEL but the Billion 8800NL R1 never had any issue with multiple sessions open at once had up 8 working fine.

My thinking to overcome the ZyXEL drawback was to have telnet or ssh as a selectable option one using telnet the other using ssh
Logged

d2d4j

  • Reg Member
  • ***
  • Posts: 551
Re: Can DSLstats use SSH instead of Telnet?
« Reply #24 on: August 08, 2017, 07:51:36 PM »

Hi

@roseway many thanks. I was thinking in terms of how php usually works with MySQL - connect once (but telnet and ssh do not allow persistent I do not think, so was thinking how ftp works, by throwing a null command to keep alive).

I thought it maybe a simple case of stopping the call to reconnect and just create a new secondary call to the commands used once connected. Sorry I do realise I do not know your program and is very easy to suggest, whilst not appreciating the effort needed sorry.

&newtonstar many thanks. I understand a little more sorry. Good thinking

The good news though, is it is expanding everyone's understanding of SSL/SSH

I hope you both have a lovely night

Many thanks

John
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #25 on: August 11, 2017, 07:40:04 PM »

I've made some progress with this, but I may also have hit a brick wall. I configured DSLstats to use SSH as an option, and in SSH mode it logs in once and stays logged in until the user hits the stop button or closes DSLstats down. This worked quite well on my Linux system, and it collected data once a minute for about 40 minutes. At the same time another instance of DSLstats on a different machine was connecting by telnet and uploading to MDWS.

However, after about 40 minutes the modem abruptly rebooted and the telnet session resumed but the SSH session didn't. I got the impression that the SSH session was stressing the modem too much. Data collection by SSH was very slow - after the initial 6 seconds to log in, each sample took about 12 seconds to collect the full set of data.

I'm not sure where I'm going to go from here.
Logged
  Eric

d2d4j

  • Reg Member
  • ***
  • Posts: 551
Re: Can DSLstats use SSH instead of Telnet?
« Reply #26 on: August 11, 2017, 07:56:10 PM »

Hi roseway

Kudos to you

Just an idea, instead of streaming the data to you Linux, why not save the data to a file on the router, then use rsync to transfer the file to your Linux

I'm sorry if this is the method you use as I am not sure how you are receiving the data, so could be entirely wrong sorry

Many thanks

John
Logged

ejs

  • Kitizen
  • ****
  • Posts: 1427
Re: Can DSLstats use SSH instead of Telnet?
« Reply #27 on: August 11, 2017, 08:09:38 PM »

I don't think that will work unless rsync is installed on the router. I think it would be even more work for the router to transfer data separately over some protocol like tftp.
Logged

roseway

  • Administrator
  • Senior Kitizen
  • *
  • Posts: 38751
  • Penguins CAN fly
    • DSLstats
Re: Can DSLstats use SSH instead of Telnet?
« Reply #28 on: August 11, 2017, 10:52:14 PM »

@d2d4j: What DSLstats does is exactly the same as one would do by logging in manually. That is, it sends a command and reads the response, then sends another command, and so on. To implement your suggestion I would still have to send each command in turn, but redirect the responses to a file. I think that would be at least as much work for the modem as reading the responses directly, even before collecting the contents of the file.

Logged
  Eric

d2d4j

  • Reg Member
  • ***
  • Posts: 551
Re: Can DSLstats use SSH instead of Telnet?
« Reply #29 on: August 11, 2017, 10:58:26 PM »

Hi ejs and roseway

Many thanks, and sorry it was just a suggestion sorry, based on it might have been quicker writing to a file on router then transfer file

Many thanks and have a lovely weekend

John
Logged
Pages: 1 [2] 3
 

anything