-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSH and Image_GraphViz problems #6
Comments
Hi, what system version is used on the router? |
However, by default you can configure anonymous access on the router (not "enabled"), in which case you do not need to specify a login/password. To specify the login/password for Telnet connection, use the following entry, for example: |
Hi, it is IOS XE, cisco asr1001. We have a username/password for security, and setup LOOKING-GLASS parser view on it (enabled access). But we are not really sure the configurations we should be doing for the script to access the router properly for the required functions. |
We on our router used anonymous access with control over IP. But you can configure a guest user, usually the login and password for is rviews/Rviews. Privileged (enabled) access is only needed if you need to specify a counter for the ping and traceroute commands. But in your system can be differently configured permissions. |
For example, here is part of the configuration from our router (Cisco 7200):
|
Thanks. I will let our network team know. However our network team seems to have set it up through SSH instead of port 23. Does that matters? If that is the case is this correct? |
You can use SSH instead of Telnet, the same way: pingtraceurl parameter basically not needed for IOS (only for Quagga). |
Thanks alot. We are still getting "telnet connection closed" although when we manually telnet port 22 from the server itself, we can get through. Thanks for your help we will check internally and let you know if any further issue. |
First, check the Telnet/SSH connection from the web-server where the script is located. |
Ok. The script uses built-in php telnet-client, and for the SSH a plink command, which comes with the putty package. Check this. |
Hi!
root@host [~]# ssh -l lgadmin 10.1.1.1 Any idea how we can fix it? |
Perhaps your version of IOS has other authorization methods for the SSH. |
We will try harder and let you know. Thanks! |
Hi!
How can we fix these? |
Hi! Also a strange thing. Telnet is working properly. However when we change to SSH, all functions returns "Command Failed". Do you know the reason why? |
Hello! I have a same problem with Command failed. Maybe with PHP 7 ? |
Hi,
|
Hi, I fixed the code for the correct working on PHP7. Please check. |
Hello Dmitry! Thank you! Right now I have no way to check the result for PHP7, but I checked the same problem on PHP5.6 and now she is gone and no problems present in logfile of Apache or Nginx. You may check all theese problems at http://lg.cln.net, os of our routers is JUNOS. Thank you again for your work! |
Hi, |
Hello Dmitry! |
Hi!
|
Hi,
|
Thank you again.
|
The result should be: http://dev.hsdn.org/graphviz_test.php
|
I commit some changes now a3703b2. Please update the script. |
Hi! We will settle the image at our end. Thanks for the advise. For the "Command failed" issue. Yes, telnet is working fine as shown on lg.apc.sg. However once we change from telnet to ssh on lg.apc.sg/index2.php , it keep showing command failed. We have updated the changes you made to your latest script as well. Can you advise? |
By default Image_GraphViz library requires GraphViz software, you need download and install it. This is a part of system requirements of the LG script:
Pear package Image_GraphViz is not includes GraphViz toolkit. It's different products. |
yapjackson, maybe you just need to do this: pear install Image_GraphViz |
GizmoV, the Image_GraphViz library is installed, because the script https://lg.apc.sg/test.php does not give an error about not found class. But the GraphViz binaries does not installed, so an empty result is returned. |
Good news. Yes we have to install Graphviz on the server. It works now. However it shows "Not found BGP information of request." You can do a test on lg.apc.sg. |
For "Command Failed" due to SSH, do you have any advice how can plink be installed on CentOS servers? |
About "Not found BGP information of request.": |
For installing plink on CentOS 7, try this:
|
Good news! After install plink it works. However you can do a ping, the response seems wrong? "SG1APCIR01 line 2 Type escape sequence to abort. |
For example, this is correct output of ping command on IOS: http://lg.regnets.ru/?command=ping&protocol=ipv4&query=8.8.8.8&router=kemerovo-br1 Perhaps the command is interrupted (Escape character detection problem? I do not known about this). Check the SSH using console command plink or ssh for see correct output. Same problem on this https://lg.apc.sg/index2.php?command=trace&protocol=ipv4&query=8.8.8.8&router=apchosting-br1 |
Yes, when we use telnet://, it displays like this: But after we change to ssh:// (no other changes, it becomes like https://lg.apc.sg/index2.php?command=trace&protocol=ipv4&query=8.8.8.8&router=apchosting-br1 I have switched index.php from ssh back to telnet now. You can try again to see the difference. |
Yes, I see. But I do not known what is wrong. On our router working ok via plink. Please check plink command directly on your server for connection to the router. |
I found the reason why. When you switch from telnet to SSH, it will ask for a local password first like this, instead of a Local-User first like telnet case. Local-Password: Do you have any advise how we can resolve this? |
Please show the string from script configuration array for your telnet connection. |
|
The "Local-Password" it is additional password? The standard login and password is sets on the configuration. Enable/admin password not supported by script. |
Can you configure the telnet/ssh on router for not using additional passwords by default? |
Hi,
We will check to see if we can do the same for SSH. Will update you! |
GizmoV, the problems shown in the screenshots are fixed. Please update. |
Hi, regarding the command problem, I think it is because when we use SSH to connect to the router, by default it need to run something like this ssh -l test 1.2.3.4 (in order to log in with a user name). Is there a command we can run to test out if the direct ssh log in command of the script works? |
Hi,
You can test this command directly on the server. More examples of usage: https://www.thegeekstuff.com/2017/05/putty-plink-examples/ |
I think I found the problem. When I manually type the command directly, the output is this: Type escape sequence to abort. However when you try it on lg.apc.sg/index2.php, you can see the rest of the output is cut off. Is there some output error by the script due to the output? |
I talked about this before. The command is interrupted prematurely. I do not know how to solve this problem. On our system works fine. I need the SSH access to your router for tests. |
Hi! Can I email it to you at dmitry.s@hsdn.org? |
Hi, |
to @hsdn |
Hi,
Can you advise how can we use userid/admin for access to the router for the script?
The text was updated successfully, but these errors were encountered: