
Oops!
TeraTerm raises "Invalid host" error.
Tera Term is common SSH software.
A lot of Windows users use Tera Term.
When we try to make SSH connection with using TTL macro file.
Sometimes we may face "Invalid host" error.


Even the content of the TTL file is correct, it raises "Invalid host" error.
Why does the error happen ?
So today, I will introduce about "How to solve "Invalid host" error of Tera Term".
The reason of "Invalid host" error


What is the reason of "Invalid host" error ?
According to the error message, it seems that host server information was wrong.
The cause of "Invalid host" error is arguments.
The first argument of Tera Term command TTERMPRO
is "host".
But we put TTL file path as host argument.
So Tera Term cannot understand host server and raises "Invalid host" error.
Tera Term command line
Tera Term command line
TTERMPRO [ <host>[[:]<TCP port#>] …
The error happens like this.
TeraTerm "Invalid host" error



Hey TeraTerm, connect to "hoge.ttl".



"hoge.ttl" is not host information.
It is a file name.
I raise "Invalid host" error.
But we failed to run TTL macro file.
What is the root cause ?
How can we run TTL macro file ?
The root cause of TTL macro failure


The root cause of TTL macro failure is program that is related to TTL file.
In case of "Invalid host" error, many people executed wrong program.
Assuming "Open MS Word file by MS Excel".
We did such a mistake.
When we face the error, TTL file may be related to ttermpro.exe
.
As I wrote, the first argument of TTERMPRO
is "host".
So when we run ttermpro.exe
with TTL file path, it raises error.



So what program should we use ?
How to solve "Invalid host" error of Tera Term


In order to run TTL macro file, we don't use ttermpro.exe
.
We should use ttpmacro.exe
to run TTL macro file.
So we have to change settings to open TTL file by ttpmacro
.
We can change settings by following steps.
- Right click TTL file.
- Select "open by program".
- Select "Other program".
- Select
ttpmacro.exe
.
Be careful that ttermpro.exe
is similar to ttpmacro.exe
.ttpmacro.exe
is for TTL macro file.


Once you change settings to use ttpmacro.exe
for TTL files, you can run TTL macro file without error.
Run TTL macro file



Hey TeraTerm macro, run "hoge.ttl" file.



OK. I run "hoge.ttl" file as macro file.
Conclusion


Today, I explained about "How to solve "Invalid host" error of Tera Term".
The important points are following.
- The root cause of TTL macro failure is program that is related to TTL file.
- In order to run TTL macro file, we don't use
ttermpro.exe
.
We should usettpmacro.exe
to run TTL macro file.



In TeraTerm folder, there are 2 exe files.
It is little bit complicated.



I see.
But once we understand it, we can solve it.