Sending commands to Linux server using TeraTerm

Let's connect to a Linux server using TeraTerm. To connect to a Linux server, you use a kind of application called SSH client, but TeraTerm is one of the SSH clients.

Download TeraTerm

Download TeraTerm.

Download TeraTerm

Install TeraTerm

Let's install TeraTerm using the installer.

It is okay to proceed as it is, but if you check only Associate "ttl" with TeraTerm macro, you can execute TeraTerm macro.

Information required for SSH connection

The information required for SSH connection is as follows. Get the following information on your Linux server: The port number is 22 unless otherwise specified. The SSH port number is 22 unless otherwise specified, but it is highly recommended to set the server's SSH port to something other than port 22 to prevent intrusion into the server.

  • IP address (eg 59.106.185.121)
  • Port number (default is 22)
  • Username (such as myapp)
  • password

Connection with TeraTerm

Open TeraTerm. Enter the IP address in the host part.

Make sure the TCP port is 22 and the service is SSH with version 2.

Press OK.

You will be prompted to enter your user name and password, so enter them. Make sure Use Plain Password is selected.

The connection is complete. You can send commands from the TeraTerm terminal to the remote Linix server using SSH.

Let's execute one command. Let's see all the files in our home directory.

ls -a

TeraTerm macro

It's a hassle to enter a connection every time. TeraTerm has a mechanism called TeraTerm macro that can automate connection processing etc. as a script.

This is a sample TeraTerm macro that connects to a Linux server. The name should be something like "development server.ttl".

connect '59.106.185.121:22 /ssh /2 /auth=password /user=myapp /passwd=gudyfuie&A'

Let's set the extension display setting of Windows to display.

Associate "Tera Term Macro Interpreter" with the extension ttl. The program name is "ttpmacro.exe" in "C: \ Program Files (x86) \ teraterm".

Associated Information