[smokeping-users] cisco, ssh

Dmitry Melekhov dm at belkam.com
Wed Mar 25 06:29:37 CET 2015


Hello!

Thank you!

I changed as you suggested.

But result is the same.
Here is output from ping.pl:

./ping.pl
terminal length 0
p100-cr3845-1#ping
Protocol [ip]: ip
Target IP address: 192.168.22.229
Repeat count [5]: 20
Datagram size [100]: 100
Timeout in seconds [2]:
Extended commands [n]: y
Source address or interface:
Type of service [0]:
Set DF bit in IP header? [no]: no
Validate reply data? [no]: no
Data pattern [0xABCD]:
Loose, Strict, Record, Timestamp, Verbose[none]: V
Loose, Strict, Record, Timestamp, Verbose[V]:
Sweep range of sizes [n]: 14114114114111111114

And here is from probe:

target => 192.168.22.229
source => 192.168.22.251
user => smokeping
Waiting for auth


and nothing more.

Probe config:
+++ DM-localhost
menu = DM-localhost
title = RTTMon ping from DM to  127.0.0.1
probe = SSHIOSPing
host = 192.168.22.229
iospass = psswd
iosuser = smokeping
source = 192.168.22.251

I changed password here :-)

I run smokeping and script on the same host, and from the same user 
account, but...


Only difference is that I run smokeping as daemon and script from console.
Can this create this problem?

Thank you!


24.03.2015 18:20, Russell Dwarshuis пишет:
> Your are not including the password parameter in Net::SSH::Expect->new so the module will try to use the files in your ~/.ssh directory.  If you are running smokeping as a different user, the files are probably not there or contain the wrong information.
>
> I see you are trying to send the password with $ssh->waitfor('word:') and $ssh->exec("$pssword").  Remove that and include password => $pssword in Net::SSH::Expect->new and it will log in for you.  If that doesn't work, the prompts that the module looks for to log in may need to be changed from deafult.  See string login() in the documentation.
>
> Russell Dwarshuis
> Application Programmer/Analyst Senior
> Merit Network
>
> ----- Original Message -----
> From: "Dmitry Melekhov" <dm at belkam.com>
> To: "Dan O'Neill" <dano at northpb.com>
> Cc: smokeping-users at lists.oetiker.ch
> Sent: Monday, March 23, 2015 11:17:21 PM
> Subject: Re: [smokeping-users] cisco, ssh
>
> 23.03.2015 22:14, Dan O'Neill пишет:
>
>
>
> There are two built-in probes.
>
> http://oss.oetiker.ch/smokeping/probe/SSH.en.html
> http://oss.oetiker.ch/smokeping/probe/AnotherSSH.en.html
>
> I use AnotherSSH and it works fine.
>
> Dan
>
>
> Hello!
>
> Thank you, but these probes are for ssh delay measurement, not for connecting cisco router over ssh and ping from it.
>
> I tried to rewrite TelnetIOSPing using Net::SSH::Expect , but, for some , unknown to me, reason it doesn't work.
> When I start almost the same script, I got normal output, but if I start it from smokeping- I got no output from ssh.
> This is what I get in debug output file:
>
> Connection is a ok
> Waiting for authWaiting for auth done
>
> I.e. there is no ssh output available at all :-(
> And the same code works OK if I start it from command line in console...
>
>
> Probe is attached, may be somebody can help me to find out what I'm doing wrong?
>
> Thank you!
>
>
>
>
>
>
>
>
> On Mon, Mar 23, 2015 at 5:08 AM, Dmitry Melekhov < dm at belkam.com > wrote:
>
>
> Hello!
>
> For yeas I'm using TelnetIOSPing and everything is fine.
> But now I need to use ssh for one cisco router- I have ssh access there, but
> I'm not admin there , i.e. I have full access, but on administative level I can't change router config
> and enable telnet access :-(
> Is there probe with the same functions as TelnetIOSPing but with ssh access?
> Thank you!
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users
>
>
>
>
> _______________________________________________
> smokeping-users mailing list
> smokeping-users at lists.oetiker.ch
> https://lists.oetiker.ch/cgi-bin/listinfo/smokeping-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ping.pl
Type: application/x-perl
Size: 3431 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20150325/df9ba015/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SSHIOSPing.pm
Type: application/x-perl
Size: 9762 bytes
Desc: not available
URL: <http://lists.oetiker.ch/pipermail/smokeping-users/attachments/20150325/df9ba015/attachment-0003.bin>


More information about the smokeping-users mailing list