How to solve "Invalid host" error of Tera Term

How to solve "Invalid host" error of Tera Term

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.

TeraTerm 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
TTERMPRO [ <host>[[:]<TCP port#>] …

Tera Term command line

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.

  1. Right click TTL file.
  2. Select "open by program".
  3. Select "Other program".
  4. Select ttpmacro.exe.

Be careful that ttermpro.exe is similar to ttpmacro.exe .
ttpmacro.exe is for TTL macro file.

ttpmacro.exe
ttpmacro.exe

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 use ttpmacro.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.

How to solve "Invalid host" error of Tera Term

この記事が気に入ったら
いいね または フォローしてね!

If you like this article, please share !
  • URLをコピーしました!
  • URLをコピーしました!

Author

karasanのアバター karasan System engineer

Mid-career engineer (AI, Data science, Salesforce, etc.).
Good at Python and SQL.

目次