[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 494: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
LogMeTT.com • MACRO for SSH - over 1000 devices
Page 1 of 2

MACRO for SSH - over 1000 devices

Posted: Sat Sep 19, 2009 12:54 pm
by ciprian_s

Re: MACRO for SSH - over 1000 devices

Posted: Sat Sep 19, 2009 3:04 pm
by boris
Add /timeout=5 to the end of your connect string and use testlink command after connect to validate if the connection was established successfully. Check TeraTerm help file for more details.

Re: MACRO for SSH - over 1000 devices

Posted: Sat Sep 19, 2009 5:50 pm
by ciprian_s

Re: MACRO for SSH - over 1000 devices

Posted: Sun Sep 20, 2009 5:45 pm
by boris

Re: MACRO for SSH - over 1000 devices

Posted: Mon Sep 21, 2009 7:32 am
by ciprian_s
hello mr boris, hello everybody !!

Well, as far as I have checked until now, the script works ok now ! :smile:
There is only one problem left, only at least this is what is bothering me now !
I want the script to create log files for both the IP addresses that are reachable or not reachable.

It would be usefull for the follwing command to work :

"filewriteln 'e:\bytton\log_ok.txt' line " or something like this.

I need to have at the end of my tests to files (log files) that would have the follwing composition :

Clock/date "@ IP reachable : (this would be a text written by me)" 'the ip address that tera term connected and did the job '. So 3 things :

1.clock/ date
2. a text written by me, followed by :
3. the IP address that tera term connected OR NOT

As I said, I need two log files. I believe I would put the lines in the 'if' and 'elseif' branches of the script. I want to mention that I tried with logopen and filewrite commands but it doesn't do the job.

Any help ?
Thanks.

Brgds,
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Tue Sep 22, 2009 1:26 pm
by IshmaelCallMe
This can indeed be done with either logopen or filewrite commands. Why don't you try it yourself for as far as you can get, then post your new code with any problems you run into that you get stuck on.

Re: MACRO for SSH - over 1000 devices

Posted: Tue Sep 22, 2009 6:40 pm
by ciprian_s
Hello IshmaelCallMe ! First of all,thanks for your reply. I have tried using log commands but I haven't succeded. First hour tomorow morning I will recheck my code, try use filewriteln as well and I will post my script code here too. I don't think I will succed as I have spent nearly half a day with the log problem. Thanks and Hope to hear from you soon cause I will surely need assistance.

Brgds,
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Wed Sep 23, 2009 8:36 am
by ciprian_s

Re: MACRO for SSH - over 1000 devices

Posted: Thu Sep 24, 2009 7:59 am
by ciprian_s
Hello everyone !

Good news, I have tried on another computer, the connection to all IP's are ok. The only problem is the log file, the output to appear one line undear the line before.

example :
IP1 ok
IP7 ok
IP23 ok
etc.

Re: MACRO for SSH - over 1000 devices

Posted: Thu Sep 24, 2009 2:04 pm
by IshmaelCallMe
Replace
logwrite ' ok '

with

logwrite ' ok'#13#10

Re: MACRO for SSH - over 1000 devices

Posted: Thu Sep 24, 2009 7:32 pm
by ciprian_s
Hello again !

I hope this is my last question : when I FIRST connect to a device, a window regarding security appears, and I have to click a button OR hit enter on the keyboard. I have tried with "send 28" but doesnt't happend anything ! Any idea ? Basicly this ENTER should come before the lines when I start to send code.

Thank u guys !

Best regards !!
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Thu Sep 24, 2009 7:39 pm
by boris
Check for the correct connect syntax.

Re: MACRO for SSH - over 1000 devices

Posted: Fri Sep 25, 2009 5:18 am
by ciprian_s

Re: MACRO for SSH - over 1000 devices

Posted: Fri Sep 25, 2009 10:48 am
by ciprian_s

Re: MACRO for SSH - over 1000 devices

Posted: Fri Sep 25, 2009 1:43 pm
by IshmaelCallMe
Try this, maybe?

viewtopic.php?f=13&t=965

Re: MACRO for SSH - over 1000 devices

Posted: Fri Sep 25, 2009 1:53 pm
by boris
If you get popup window titled "SSH Authentication" and your macro does not move forward until you hit <Enter> this either means you have incorrect connect string (that's why I suggested you to read another topic), or old version of TeraTerm. Make sure you are running TeraTerm 4.63.

You cannot interact with "SSH Authentication" window by sending sendln or any other macro commands. You either pass it after running connect, if connect syntax matches your remote host authentication method (which can be different) and if credentials are correct, or not.

Since connect is inside the loop and assuming that all remote hosts are using the same authentication method, you should be hitting <Enter> for each connection. Is that true? I got impression from your posts that popup appears only once. Please confirm.
Also, try to change the order of IP-s in bytton_IP.txt file to identify whether the popup is "linked" to certain IP(s) or not.


And finally, please use macro code syntax highlighting when you post on these forums. Either select the code and click "Code" button above editor area, or surround your code with [code] [/code] tags.

Re: MACRO for SSH - over 1000 devices

Posted: Sat Sep 26, 2009 4:35 am
by ciprian_s
hello folks !

It seems that I was not so clear. There is nothing wrong with the ssh authentication window. I will say it again. When the script reads bytton_IP.txt file it grabs an IP address, and then tries to connect. At this point, TeraTerm opens a window - a window in which I will see the password changes and all I want the script to do to the device. But, before all this, upon the main TEraTerm window appears the ssh authentication window. I DON'T have to press anything to get passed this window. NOW, HEAR THE PROBLEM : Upon this ssh auth window appears the third window, which, mr. Boris, appears to every IP address the first time I connect to it - it is about security, it says something about the network I am trying to access , bla bla bla. THE fact is that I have 2 buttons at this point : Connect and Disconnect . Anyway, connect is selected already and I have to ONLY hit enter on keyboard.
After I hit enter, the ssh authentication window continues it's job, authenticates the host - IP address and the Tera Term window starts to change passwords or whatever job I'll do.

My problem is, how am I going to get rid of that 3rd window ? How is TeraTerm going to hit enter key so that the process can continue ?
I hope that this time I was more clear.

Thanks and best regards !
Ciprian

Re: MACRO for SSH - over 1000 devices

Posted: Sat Sep 26, 2009 5:56 am
by boris
Ok, now we are talking :smile:. The windows you are referring to has title SECURITY WARNING and notifies user that server's key fingerprint has not been saved in known hosts file.

This window appears when you SSH to a remote server at the very first time. Once you click Continue in this popup box, it will never show up again for that server, unless you delete ssh_known_hosts file from TeraTerm directory, or remote server's fingerprint changes.

Now, the bad news is that there is no way to avoid this popup using macro and the only existing solution is to use 3rd party tool AutoIt as IshmaelCallMe suggested earlier.

This issue has been brought up several times here, but by some reason TeraTerm project team is very reluctant in addressing this problem. My understanding is that they are trying to enforce security by keeping this popup.
Well, I guess it is time to ask them directly:

Yutaka, maya, doda: what would you suggest Ciprian to do, to avoid clicking Continue button manually 1000 times?

Re: MACRO for SSH - over 1000 devices

Posted: Sun Sep 27, 2009 11:54 am
by ciprian_s
Hello everyone ! Well, mr Boris indeed understood what my problem is ! I am very happy to be on this forum and I am also very thankfull for your quick responses ! Let us hope we are going to have an answer from the experts, as I presume ! Thank you all, I shall wait now ...

Best regards,
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Wed Sep 30, 2009 9:48 am
by ciprian_s
Hello mr Boris ! Do I have to make another request to the Tera Term developers : Yutaka, maya, doda ?? Or I just have to wait for a response ? Thank you in advance for your response !!!

Beste regards,
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Wed Sep 30, 2009 3:02 pm
by boris
Do not create duplicate messages, they are considered spam and may "cost" you a warning. Read our .

I'd suggestion you to create new topic under and request the feature of having bypass option for that additional popup. Make sure you mention the number of devices you're dealing with.

Another place to post your request is TeraTerm project site in Japan http://en.sourceforge.jp/projects/ttssh2/. There are few sections there - another forum, bugs reporting section and suggestions section.

And finally, please lower your expectation. It may take quite some time before you get the answer, if ever. As I've mentioned earlier you are not the first one who brought up this issues and it stays unresolved for years. Consider using AutoIt, or if you, or someone of your friends knows programming language C, just obtain TeraTerm source and try to fix this issue yourself. The downside of latter approach is that you will need to re-introduce your fix in each new release of the software.

Re: MACRO for SSH - over 1000 devices

Posted: Sat Oct 03, 2009 3:58 pm
by Yutaka Hirata
Hi Boris,

I added a new "/nosecuritywarning" option in the TTSSH command line. When a user uses this option, the known_hosts check dialog does not appear on connecting to the server with SSH2 protocol. And also, this option has the security problem. I decide that this option is the hidden option. So, I will not document about this option in the Tera Term reference.

http://ttssh2.sourceforge.jp/snapshot/s ... 091004.zip

Thanks.

Re: MACRO for SSH - over 1000 devices

Posted: Sun Oct 04, 2009 1:38 am
by boris
THANKS YUTAKA !!! :veryhappy: :veryhappy: :veryhappy:

Ciprian: Please test this build and let us know if it works.

Re: MACRO for SSH - over 1000 devices

Posted: Mon Oct 05, 2009 9:25 am
by ciprian_s
Hello Boris, hello Yutaka, hello readers !

what am I supposed to do to use it ? after downloading the package, I saw that it was like my original tera term folder !!! what am I supposed to do ?

Hope to hear from you soon !
Have a nice day, bye bye !

Best regards,
Ciprian.

Re: MACRO for SSH - over 1000 devices

Posted: Tue Oct 06, 2009 8:47 pm
by boris
Ciprian: Just add /nosecuritywarning to the end of your connect string and run your macro using the latest TeraTerm build provided by Yutaka.

Info for all: /nosecuritywarning completely removes additional security popup window, however, it does not add server fingerprint to ssh_known_hosts file, which I think is very good solution. Thanks again, Yutaka!