• Support
  • Articles
  • Resources
  • Products

Macro for SSH

Moderator: boris

  • 1
  • 2

33 postsPage 1 of 2

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Mon May 14, 2007 3:37 pm
My question is i'm trying to run a .ttl with SSH. What i want this to do is login and do major changes to Enterasys Routers (over 400). I have made one for telnet but the code is not recognized when i use SSH. I want to have a pool of IP address and once it gets done with one router it goes to the next and the next and so on. here is my code for telnet. Please Help!!!



:?

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Mon May 14, 2007 3:54 pm
Check the following 2 threads to find the answers on your questions:
http://logmett.com/forum/viewtopic.php?t=449
http://logmett.com/forum/viewtopic.php?t=28
Thanks.
Best regards,
Boris
thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Mon May 14, 2007 4:07 pm
I tried that code and changed it to SSH and it still couldnt recognize it.

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Mon May 14, 2007 4:17 pm
Could you please explain what do you exactly mean by "the code is not recognized" ?
Have you tried to enter all your commands "by hand" ? Did they work?

Paste here the output of your screen, that will give us better idea of what is the issue.
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Mon May 14, 2007 4:28 pm


I am not sure what to connect to. Also i don't want to type in the username and password.

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Mon May 14, 2007 4:41 pm
Your connect string does not look right to me. Let's take 1 step a time.

Create new macro and add the followig line:


Replace myserver with your server name or IP address. Replace username with actual username and password (at the end of the line) with actual password. Do not change /auth=password part of the string. Are you able to connect using this syntax ?
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Mon May 14, 2007 4:51 pm
when i put an IP in there, from one of our routers i get an error says SSH2 autologin error. If i go to the main menu and type it it works. so something with the autologin is breaking the macro

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Mon May 14, 2007 5:03 pm
When logging in interactive mode do you use plain password to log in (phassphrase), RSA/DSA key or challenge/response option?
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Tue May 15, 2007 1:15 pm
I use plaintext. we have a standard word we use. i downloaded teraterm from http://ttssh2.sourceforge.jp/ where i click the icon on the bottom right corner and go to list configuration and i add some of our sites into and i put ssh and put the passphrase in it and then try and execute it it just has ssh 2.0.0.0 on the screen.

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Tue May 15, 2007 2:13 pm
click the icon on the bottom right corner

Are you talking about LogMeTT application?

Could you try to start ttermpro.exe from TeraTerm installation directory, then in New Connection window enter your IP address, select service SSH, select SSH version SSH2, make sure that TCP port is set to 22 and click Ok. Another window will show up where you will need to enter your username and password. Could you please do this "pure" test and let us know if it works.
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Tue May 15, 2007 2:16 pm
The pure test works. When i add a new one i have to store the key and all the but once its in there it works fine. I was talking about the TeraTerm Menu on the bottom right corner.

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Tue May 15, 2007 2:21 pm
TeraTerm Menu is old application that is not supported any more (as far as I know). You can do the same and much more using my LogMeTT tool. It is part of TeraTerm package. Check LogMeTT help file to learn about it.
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Tue May 15, 2007 5:08 pm
Do you know why the autologin fails? And the version of tera term might not be any good now a days. Thanks,

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Tue May 15, 2007 5:23 pm
Install the latest version 4.52 and try again http://logmett.com/freeware/TeraTerm/ ... f8_452.exe
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Tue May 15, 2007 5:54 pm
Unfort. same thing. It looks like its working and then it says autologin fails. I can send you my script i have used for telnet and it works like a charm. Just can't get it to work for SSH because the autologin and i think the RSA Key needs to be in the ssh_known_hosts section before it can work with every IP correct me if i'm wrong

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 16, 2007 1:25 pm
You need to ssh to each server in interactive mode at least once to accept the keys. After that your macro should work. Make sure that remote node accepts SSH (port 22 is listening) and you are using correct ssh mode (SSH1/SSH2)
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Wed May 16, 2007 1:32 pm

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 16, 2007 1:47 pm
Create new macro, add one line

then manually enter username and password in popup window and check if it will work.
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Wed May 16, 2007 1:50 pm
That works when i type everything in manually but when i try for the autologin it fails. When i do it manually how do i get back to my script?

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 16, 2007 1:54 pm
Does your password contain @ or space?

mportant note: The password can contain space character. To represent space inside the password replace it with @ character. If @ character itself is part of the password than it has to be replaced with 2 consecutive @ characters @@.
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Wed May 16, 2007 4:24 pm
I do have a @ sign but when i try to put @@ where the @ sign is it still fails. I changed the password and took out the @ and it works!!!!!!!!

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 16, 2007 4:33 pm
Yutraka, maya:

Could you please double check the code to make sure @ and space in passwords work as described in the Important note of this topic: http://logmett.com/forum/viewtopic.php?t=28
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Wed May 16, 2007 4:37 pm
connect 'xxx.xxx.xxx.xxx:22 /ssh /auth=password /user=admin /passwd=Callaw@@y'

Correct syntax? If so this is the code that fails.

 

boris
Moderator, LogMeTT and TTLEditor developer

Posts:
1606
Joined: Sat Jan 08, 2005 2:52 pm
by boris » Wed May 16, 2007 5:00 pm
Looks correct to me. :?
Thanks.
Best regards,
Boris

 

thrdbseshwcase3
Newbie

Posts:
17
Joined: Mon May 14, 2007 3:30 pm
by thrdbseshwcase3 » Wed May 16, 2007 6:23 pm
Once i have connected to the router how am i able to send lines

connect 'xx.x.xx.xxx:22 /ssh /auth=password /user=xxx /passwd=xxxx'

sendln 'en'

Once im in the router i want to start sending command and i know the syntax is not correct i do not believe
Display posts from previous:
Sort by:
  • 1
  • 2

33 postsPage 1 of 2

Users browsing this forum: No registered users
cron