Welcome to the VanDyke Software Forums

Join the discussion today!


Go Back   VanDyke Software Forums > Scripting

Notices

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 03-26-2015, 03:46 AM
Negi1984 Negi1984 is offline
Registered User
 
Join Date: Mar 2015
Posts: 12
How to extract data via SSH command

Hi All,

I am not aware of programming. I am using Secure CRT Version 7.2.1 (x64 build 443)

After login to Server I need to ssh one by one list of IP's and run a command
for each IP : Eg:

scre 0 temp
dis mac-address dynamic verbose
quit



Result showing in screen like as below:-

[u11111111@aaa ~]$ssh 10.35.9.13


**************************************
* Welcome to L1PE-NAM-11 *
* This device is managed by ******* *
* Unauthorised access is prohibited *
**************************************

User Authentication
Password:
Warning: No xauth data; using fake authentication data for X11 forwarding.

Info: The max number of VTY users is 20, and the number
of current VTY users on line is 2.
The current login time is 2015-03-26 10:32:05+01:00.
Info: First time access. Failed: 0

<L1PE-NAM-11>scre 0 temp
Info: The configuration takes effect on the current user terminal interface only.
<L1PE-NAM-11>dis mac-address dynamic verbose
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address: 0000-5e00-0128 VLAN/VSI/SI : OLU-FW-990
Port : Tun0/2/1 Type : dynamic
PEVLAN : - CEVLAN : -
TrustFlag : 0 TrustPort : -
Peer IP : 212.224.147.1 VC-ID : 1
Aging time : 295 LSP/MAC_Tunnel: 1/49393
TimeStamp : 35085

and so on..........................

--------------------------------------------------------------------

Now every time when I am running the above mentioned command. For many of IP's after showing the partial result screen got stuck every time.

Some body told me that I need to run command in backand and not to print the display. After that I will be able extact the data without and stuck.

Can anybody assist me.

Regards,
Rajender
Reply With Quote
  #2  
Old 03-26-2015, 08:07 AM
Negi1984 Negi1984 is offline
Registered User
 
Join Date: Mar 2015
Posts: 12
Quote:
Originally Posted by Negi1984 View Post
Hi All,

I am not aware of programming. I am using Secure CRT Version 7.2.1 (x64 build 443)

After login to Server I need to ssh one by one list of IP's and run a command
for each IP : Eg:

scre 0 temp
dis mac-address dynamic verbose
quit



Result showing in screen like as below:-

[u11111111@aaa ~]$ssh 10.35.9.13


**************************************
* Welcome to L1PE-NAM-11 *
* This device is managed by ******* *
* Unauthorised access is prohibited *
**************************************

User Authentication
Password:
Warning: No xauth data; using fake authentication data for X11 forwarding.

Info: The max number of VTY users is 20, and the number
of current VTY users on line is 2.
The current login time is 2015-03-26 10:32:05+01:00.
Info: First time access. Failed: 0

<L1PE-NAM-11>scre 0 temp
Info: The configuration takes effect on the current user terminal interface only.
<L1PE-NAM-11>dis mac-address dynamic verbose
MAC address table of slot 1:
-------------------------------------------------------------------------------
MAC Address: 0000-5e00-0128 VLAN/VSI/SI : OLU-FW-990
Port : Tun0/2/1 Type : dynamic
PEVLAN : - CEVLAN : -
TrustFlag : 0 TrustPort : -
Peer IP : 212.224.147.1 VC-ID : 1
Aging time : 295 LSP/MAC_Tunnel: 1/49393
TimeStamp : 35085

and so on..........................

--------------------------------------------------------------------

Now every time when I am running the above mentioned command. For many of IP's after showing the partial result screen got stuck every time.

Some body told me that I need to run command in backand and not to print the display. After that I will be able extact the data without and stuck.

Can anybody assist me.

Regards,
Rajender
Adding to above my query ,
If I am running the command "dis mac-address dynamic verbose
without Scre 0 Temp command and after that hitting space bar key than output is coming.

Awaiting for your valuable suggestions :-)

Regards,
Rajender
Reply With Quote
  #3  
Old 03-26-2015, 10:03 AM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Negi1984,

Thanks for the posts.

Are you seeing this behavior when running a script or manually running the commands?

If you are using a script, please post it.
NOTICE: The requested troubleshooting data may include sensitive information (usernames, passwords, publicly-accessible host names or IP addresses, etc.).

Please redact sensitive information that would not be appropriate for a public forum prior to posting the requested information.

If there is sensitive information that must be conveyed in order to provide a complete picture of the scenario you're facing, please let us know and we will set up a secure upload mechanism that can be used.
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
  #4  
Old 03-27-2015, 01:47 AM
Negi1984 Negi1984 is offline
Registered User
 
Join Date: Mar 2015
Posts: 12
Quote:
Originally Posted by rtb View Post
Hi Negi1984,

Thanks for the posts.

Are you seeing this behavior when running a script or manually running the commands?

If you are using a script, please post it.
NOTICE: The requested troubleshooting data may include sensitive information (usernames, passwords, publicly-accessible host names or IP addresses, etc.).

Please redact sensitive information that would not be appropriate for a public forum prior to posting the requested information.

If there is sensitive information that must be conveyed in order to provide a complete picture of the scenario you're facing, please let us know and we will set up a secure upload mechanism that can be used.
Hi Vandyke,

Currently I am running the said command one by one manually.
if I am running the command. I have list of Nodes in excel file.
and command list in Notepad file and I just copy and right click the same 1 by one in Secure CRT.

If I am running command by copy all below and run in secure CRT then it stuck in middle always for the IP's which have very huge data (around 50MB or :-

scre 0 temp
dis mac-address dynamic verbose
quit

and if I am running only command :-

dis mac-address dynamic verbose

then it shows complete result but I need to press space bar key multiple time to get all the data in screen/log file.

Thanks in advance for your valuable suggestion for this issue.

Regards,
Rajender
Reply With Quote
  #5  
Old 03-27-2015, 01:39 PM
rtb rtb is offline
VanDyke Technical Support
 
Join Date: Aug 2008
Posts: 4,305
Hi Rajender,

Thanks for the update.

It seems like this problem may lend itself to a script very well. We have an example that seems to illustrate what you want accomplish at the following location:
https://forums.vandyke.com/showthrea...7294#post37294
Does this help you accomplish your goal?
__________________
--Todd

VanDyke Software
Technical Support
support@vandyke.com
505-332-5730
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 12:34 AM.