Currently Teraterm is probably the best free/open source Telnet/SSH client
for Windows environment. It supports both Telnet and SSH (scp functionality
is also supported via File/send file and File/SSH SCP menu items).
Teraterm known by the abbreviation `TT' was created in 1994 in
Japan. The original author of the Teraterm was Takashi Teranishi.
Teraterm was released as freeware and won "Online software grand prize 97"
competition held by Japanese tool portal Madonomori in 1997. Takashi Teranishi
stopped developing Teraterm in 1998. The latest official version created
by him was version 2.3.
In September 2004 group of Teraterm enthusiasts from Japan was able to
contact Takashi Teranishi, obtained the permissions to develop Teraterm
further and to distribute it under BSD license. They launched the project
at SourceForge.jp and released series of versions starting from 4.00.
Support forum was established in early 2005. It is the place where TeraTerm
users can ask their questions, exchange ideas, share their experience working
with the application, post new feature suggestions or report the bugs.
The current version of Teraterm is 4.62.
The product has non-intuitive configuration, but generally functionality
is very good. It provide history of visited sited out of the box and
has ability to change the size of screen on the fly. The package has
the following features:
Ability to connect via telnet, SSH1 and SSH2 protocols.
Allow recurring command to be sent to connected hosts (i e: "keep-alive")
Vendorscript Macro Language to allow automatic connectivity and
some scripting functionality
Serial port connections.
Ability to serve as a Cygwin terminal
IPv6 communication.
VT100 emulation and selected VT200/300 emulation.
TEK4010 emulation.
SFTP file transfer support.
support of Kermit, XMODEM, ZMODEM, B-PLUS and Quick-VAN).
Japanese, English, Russian and Korean character sets.
UTF-8 character encoding.
Notes:
The right site to download the latest version of Teraterm
is Japanese SourceForge site:
Teraterm Open
Source Project or LogmeTT site (logmett.com).
The latter is probably is more convenient for US users. During installation
you should generally avoid selecting Connect component (which provides
tabs) as it does not work well.
Many older and obsolete versions are still available on various
sites and are displayed prominently Google (the first and the third
site in Google search "teraterm" should be ignored):
Please avoid downloading software package from the original
site
Tera Term Home Page
Please avoid downloading a version 3.1.3 called Teraterm
Pro Web from Ayera Technologies (http://www.ayera.com/teraterm/).
This package (
ttpro313.zip) is an abandonware created October 8, 2002 and
never updated since then.
Authentication notes. There is a difference between SSH authenticaling
using "passphrase" (the default method of authentication in Teraterm
distribution) and Challenge/response (keyboard interactive). Most SSH
servers refuse passphrase authentication. To enable it you need to change
in y0ou /etc/ssh/sshd_config file (or equivalent) the following setting
# To disable tunneled clear
text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
You can change the default method via Setup/SSH authentication and
then selection "use chanllenge/response to log in..." (or chache
DefaultAuthMethod=3 to DefaultAuthMethod=5 in teraterm.ini file)
That makes Teraterm behavior compatible with Putty where this authentication
method is a default.
With a special setting (Setup
-> Additional Settings -> Copy & Paste ->DisableMouseRButtonPaste)
version 4.58 (but not 4.62) understands Unix-style middle mouse button
paste operation.
What's really important is the teraterm has macro capabilities that enable
automatic login to any conceivable Unix or linux or Cisco boxes (both
SSH and telnet logins). Teraterm macro language is documented at
MACRO Help Index
Teraterm also can be used as Cygwin terminal (in addition to the entry
in the File menu it has a shortcut Alt-G). It is a much better command window
then windows CMS and is highly recommended for all Cygwin users
Generally you should use version 4.58 or later (the current version is
4.62) as there were important additions to macro language in recent
versions (starting from 4.52):
2006.2.10 (Ver 4.27)
added 'mpause' macro command. This command enables the macro
script to pause the specified time in millisecond.
added the sample TTL macro 'mpause.ttl'.
added 'random' macro command. This command enables the macro
script to generate the random value.
added the sample TTL macro 'random.ttl'.
2006.10.09 (Ver 4.46)
added 'clipb2var' macro command. This command enables the macro
script to get data from clipboard.
added 'var2clipb' macro command. This command enables the macro
script to set data to clipboard.
2007.8.8 (Ver 4.53)
added ‘tolower’ macro command.
added ‘toupper’ macro command.
added ‘break’ macro command.
added an argument to inputbox macro command.
New argument is used for
default input string.
added logical operator "&&", "||", "!"
and bitwise operator "&", "|", "^", "~" for macro.
added "Cygterm Here" to a context menu
of Explorer. CygTerm can be started from an any directory on Explorer.
2007.9.30 (Ver 4.54)
added shift operator ">>", "<<", ">>>" for macro.
changed the priority of macro operator in the following order:
added support of handling large text data in clipboard to macro
command clipb2var.
added new argument to macro command clipb2var. It controls start
position of copying. if clipboard content is too long and copied
string was truncated, clipb2var returns 2 in system variable "result".
added 'do', 'loop' macro command.
added 'until', 'enduntil' macro command.
added 'callmenu' macro command.
added `screencapture.ttl' file as a sample TTL macro.
2008.1.15 (Ver 4.57)
added 'cygconnect' macro command.
added new argument to getdate and gettime macro command. It
specifies date and time format.
; 1. Open Tera Term Pro (free
VT100 emulator)
; 2. Control -> Macro
; 3. choose 99b.ttl
;
; it will run even if you close the app, to kill prematurely please
open
; taskmanager and kill the ttpmacro.exe
;
; 99 Bottles of Beer macro for Tera Term
; by Lance Yamada
for i 99 1
j = i - 1
int2str istr i
int2str jstr j
strconcat istr ' bottles of beer
on the wall,'
strconcat jstr ' bottles of beer on the wall!'
if i = 1 then
messagebox '1 bottle of beer on the wall,' 'Tera Term'
messagebox 'time to get more beer!' 'Tera Term'
else
messagebox istr 'Tera Term'
messagebox 'take one down pass it around,' 'Tera Term'
messagebox jstr 'Tera Term'
endif
next
Several sample ttl file are included with Teraterm but they usually need
some minor tweaking before they work with real servers. For example:
Special utility
LogMeTT
written by Boris Maisuradze permits convenient storage of login macros
for various servers greatly simplifying the task of getting to the
right server in minimum time and with minimum hassle (if macros contain
passwords they probably should be protected via encrypted drive or similar
method). It permits grouping server by location, by operating system, etc.
It is highly recommended and really worth the effort of learning the interface.
Among notable features:
Supports sub-node levels in the Connection Tree
Supports Cut, Copy, Paste, Move Up, Move Down, Duplicate, Import,
Export operations on Connection Tree nodes
Contains TeraTerm Macro editor with configurable syntax highlighter,
syntax proposal. Author claims that there arecontextual help features but I cannot
make them working
Supports macro script Printing with
hightlighted syntax in black&white and color modes
Contains a couple of Macro Templates for telnet and ssh2 connections.
Macro Templates are external a plain text file that can be modified
by users to build their own Template Libraries
Supports macro startup scheduler similar to cron job in Unix/Linux
based platforms
Allows to execute one particular macro script or the chain of scripts
belonging to the same branch of Connection Tree
Allows to execute entire macro script or part of it from the beginning
to current cursor position; this helps during script development and
testing
Allows to select and execute together several macro scripts belonging
to different nodes of Connection Tree; then optionally tiles all opened
TeraTerm windows on the desktop for further use of TeraTerm's Broadcast
command
Supports Connection Tree branch or individual macro import/export
operations
Extends TeraTerm Macro language with the set of configurable Key
Words that can be user, connection or OS specific
Allows to Release and Renew DHCP assigned IP address or addresses
in two mouse clicks via items in System Tray Popup menu
Displays configuration settings of each installed and enabled network
adapter
Comes with command line macro starter RunLTT
When not in use, can run as background process occupying just about
400K of memory
Please note that many users try to reinvent the bicycle in a form of
yet another macro language for terminal emulation.
Expect is a more universal and
often more powerful way of doing the same. It frees you from the dependency
of somebody design mistakes and the luck of understanding of compiler/interpreter
technology. You should learn to use it on Unix. The efforts instantly pay
for itself.
The teraterm.ini file contains
all the configuration settings and parameters used by the application. You
may modify the file directly in editor. or through the executable (teraterm.exe)
by changing settings then saving the configuration via the Setup -->
Save Setup... menu.
Multiple setup file are possible, for example one for AIX, one for HP-UX,
one for Solaris and one for Linux.
Modern versions of Teraterm keep the list recently visited hosts. That's
a very convenient feature.
Notes:
This is a Spartan WHYFF (We Help
You For Free) site written by people for whom English
is not a native language.
Some amount of grammar and spelling errors should be
expected.
The site contain some broken links
as it develops like a living tree...
Please try to use Google, Open directory,
etc. to find a replacement link (see
HOWTO search the WEB for details). We would appreciate
if you can
mail us a correct link.
Posted: Fri Mar 16, 2007 5:34
pm Post subject: First
step to Tera Term Macros
First to all I want to congratulate
this wonderful tool of trade
I'm willing to take my first step into Tera Term Macros
and I will probably won't make it on my own.
So here's the deal.
I want to be able to telnet to an access router in a companies
HQ and then telnet into all the switches and do a "show
tech" command in order to backup all the configs and informations
about the switches into a text file.
All the switches are Cisco 2950.
Please help this poor man in need of your assistance.
With My best regards,
boris Guru
Joined: 08 Jan 2005
Posts: 496
Location: Seattle, WA, USA
Posted: Fri Mar 16, 2007 6:34
pm Post subject:
Depending on the number of switches
different approaches can be taken. Can you say roughly how
many switches you need to connect to?
_________________
Thanks.
Best regards,
// Boris
linkstate Newbie
Joined: 16 Mar 2007
Posts: 7
Posted: Fri Mar 16, 2007 6:37
pm Post subject:
boris wrote:
Depending on the number of switches
different approaches can be taken. Can you say roughly
how many switches you need to connect to?
About 600 Switches :s
Cheers,
boris Guru
Joined: 08 Jan 2005
Posts: 496
Location: Seattle, WA, USA
Posted: Fri Mar 16, 2007 7:16
pm Post subject:
TeraTerm macro can definitely help
you but writing such script is not an easy task. I'd suggest
you to approach it in few steps.
Start with writing telnet connection macro script to establish
connection to your access router in HQ. You can use connection
template from LogMeTT or sample code from one of the topics
in these forums.
Then develop your script further to establish the second
connection.
Step 3 will be to get familiar with opening and closing
log files from macro. Here you can also add your "show tech"
command.
Once you get to this point your macro will be able to reach
one of your Cisco-s collect printout and save it into local
file.
Then comes the tricky part. You need to store IP addresses
of all your 600 switches in plain text file and run your
macro in the loop where every execution will be using one
IP from your IP list. Similar issue was discussed not long
ago on our forums; just do some search and reading here.
2 more files that will help you are macro.hlp and LogMeTT.chm.
You will find them both in TeraTerm package. Finally do
not forget to give different file names to each log file.
You probably can build log name from IP address and current
time stamp. Check code snippets in our forums for the example.
_________________
Thanks.
Best regards,
// Boris
linkstate Newbie
Joined: 16 Mar 2007
Posts: 7
Posted: Fri Mar 16, 2007 8:24
pm Post subject:
I'm feeling a bit fuzzy about this
....
My first piece of code turned out something like this:
connect 'ip address:23 /nossh' ----> that's my office
wait'Username:'
sendln'usernamexxx'
wait'Password:'
sendln'passwordxxx'
wait'hostname>'
sendln'telnet 172.23.128.11' ----> that's the HQ of the
company
wait'Username:'
sendln'usernamexxx'
wait'Password:'
sendln'passwordxxx'
Okay.
I have something like this...
I'm testing with a .txt file with just two ip addresses
for testing.
The thing is that he only telnets into the first ip address
in that file and doesn't jump into the 2 ip address.
Could it be something with the while procedure ?
sendln line
while result=0
connect_line='telnet ' ;
strconcat connect_line line
Joined: 08 Jan 2005
Posts: 496
Location: Seattle, WA, USA
Posted: Sun Mar 18, 2007 11:11
am Post subject:
Read description of
strconcat function.
Your connection string is in
connect_line and
not in line.
There are few other issues with your last code. Please post
here your complete macro, otherwise it is unclear if there
are scripting or copy/pasting errors.
_________________
Thanks.
Best regards,
// Boris
linkstate Newbie
Joined: 16 Mar 2007
Posts: 7
Posted: Sun Mar 18, 2007 11:18
am Post subject:
Let me see if I can explain this
better to you.
Here's the whole code with comments
connect '213.xx.xx.xx:23 /nossh' ---> My first telnet to
my company
wait'Username:'
sendln'xxxxxxx'
wait'Password:'
sendln'xxxxxxx'
wait'hostname>'
sendln'telnet 172.23.xx.xx' ---------> My telnet to the
other company
wait'Username:'
sendln'xxxxx'
wait'Password:'
sendln'xxxxxxx'
-------------"So far So good here"--------------------
fileopen filehandle 'andre.txt' 0
filereadln filehandle line
sendln line
while result=0
connect_line='telnet ' ;
strconcat connect_line line
while result=0
connect_line='telnet '
filereadln filehandle line
strconcat connect_line line
sendln connect_line
wait 'Username:'
sendln 'xxxxx'
wait 'Password:'
sendln 'xxxxx'
timeout = 4 ; I'm not sure
why do you need this line
sendln 'xxxxx' ; and this line
sendln 'show tech'
wait 'xxxxxxxxx' ; <= whatever appears at the end of 'show tech'
printout
sendln 'exit'
endwhile
fileclose filehandle
exit
_________________
Thanks.
Best regards,
// Boris
IshmaelCallMe Coach
Joined: 25 Jan 2006
Posts: 119
Location: Denver, Colorado, USA
Posted: Mon Mar 19, 2007 6:53
am Post subject:
You need to move your filereadln
command to just before the while and a copy of it to just
before the endwhile so that the result variable gets set
correctly for both the first and subsequent loops.
boris Guru
Joined: 08 Jan 2005
Posts: 496
Location: Seattle, WA, USA
fileopen filehandle 'andre.txt' 0
filereadln filehandle line
while result=0
connect_line='telnet '
strconcat connect_line line
sendln connect_line
wait 'Username:'
sendln 'xxxxx'
wait 'Password:'
sendln 'xxxxx'
timeout = 4 ; I'm not sure
why do you need this line
sendln 'xxxxx' ; and this line
sendln 'show tech'
wait 'xxxxxxxxx' ; <= whatever appears at the end of 'show
tech' printout
sendln 'exit'
filereadln filehandle line
endwhile
fileclose filehandle
exit
_________________
Thanks.
Best regards,
// Boris
IshmaelCallMe Coach
Joined: 25 Jan 2006
Posts: 119
Location: Denver, Colorado, USA
Posted: Mon Mar 19, 2007 8:11
am Post subject:
There ya go, that oughta work.
One additional thing I would suggest to the original poster
is to set the "timeout" variable BEFORE any wait or waitln
statements (not in the middle of the loop, as it is now!)
and then (ideally) check the "result" variable each time.
If the timeout variable is not set, I believe it defaults
to 0, which means the script will wait forever at that point
if the text does not show up.
When you use the Solaris telnet command to log in from one site to another,
don't forget that you can enter telnet's command mode at any time during
your session, usually by entering the following key sequence:
[CTRL] ] (the control key and right-bracket key at the
same time)
When this is successful, you'll see the following prompt:
telnet>
Then, from the "telnet>" prompt, enter "?" to learn more about the available
telnet commands. A few commands that will give you more help at the
prompt are shown below:
display displays
many current Telnet settings
send ? displays
commands you can "send" to the remote site
set ?
displays variables that can be set
One of my favorites (mostly when fooling around) is:
New Russian character sets (CP 866 and ISO 8859-5).
Free, a good customizable telnet client with VT320 emulation, works
on TCP/IP connections, as well as serial dial-ups. Scripting is possible
with "Tera Term Language".
TeraTerm Pro Web is the next generation tool for connecting with
remote Telnet and SSH hosts. It is built based on the extremely popular
open-source TeraTerm product put out by T. Teranishi in 1999 (click
here for original site). In keeping with the original philosophy
and spirit of the author, our modified version is completely
free!!
Downloads
TeraTerm Pro Web works on Windows 95/98, 2000, XP. Here are the latest
TeraTerm Pro Web releases:
The statements, views and opinions presented on
this web page are those of the author and are not endorsed by, nor do they necessarily
reflect, the opinions of the author present and former employers, SDNP or any other
organization the author may be associated with.
We do not warrant the correctness of the information provided or its
fitness for any purpose
In no way this site is associated with or endorse cybersquatters
using
the term "softpanorama" with other main or country domains (e.g. softpanorama.com) with
bad faith intent to profit from the goodwill belonging to
someone else.