TTSSH for Tera Term Pro - The Very Basics

By Nita Daniel
TTSSH for Tera Term Pro - The Very Basics

First, you'll need an ssh client, if you're not already using one. I like Tera Term Pro (download) terminal emulator with the TTSSH (download) extension installed. I like Tera Term because it's free and has features that coddle my Windoze habits, such as cutting and pasting. TTSSH itself is solid, exported from Australia (thus bypassing some US export restrictions), and includes port forwarding, so that you do not need a separate client or command line program.

Start by installing Tera Term Pro. Then, unzip TTSSH into the Tera Term program folder. From now on, use ttssh.exe (located in that folder) instead of the icons made by the Tera Term installation. If you like, go ahead and edit the icons' properties so that they use the ttssh executable.

Now, login to your csoft account using ttssh. When you start ttssh without specifying a connection in the command line, you get the new connection dialog.

  • Type your server's host name in the Host combo box
  • Make sure the SSH radio button is checked
  • Click OK
  • You'll be prompted for a username and password. Give your csoft username and password, click OK, and bam!, you're logged into your account.
Port Forwarding

In order to securely use otherwise unsecure programs, such as POP, SMTP, and FTP clients, use port forwarding. One of TTSSH's strengths is its ease in configuring port forwarding. The following example demonstrates how to forward your local SMTP port to your csoft host's SMTP port.

  • Click on the Setup menu
  • Choose SSH Forwarding
  • Click Add
  • Ensure that the Forward local port radio button is checked, in the top section of the dialog
  • Choose smtp from the Forward local port combo box
  • Type your mail server's hostname in the To local machine text box
  • Choose smtp from the port box
  • Click OK
  • The Forwarding setup dialog now lists the new forwarding configuration "Local 25 (smtp) to remote "your-mail-server" port 25 (smtp)
  • Click OK to return to the terminal screen
  • Choose Save Setup from the Setup menu
  • Click OK to use the default ini file

Do the same for the POP and FTP ports. Now, in your Windows client programs, configure them to connect to localhost instead of csoft. Be sure to have a ssh connection to csoft whenever you attempt to use these programs.

Automating your login

Now we'll generate and obtain a keyfile. Then we'll configure TTSSH in order to provide some automation, including modifying a Windows icon. Note that you should only automate your login if you connect from a machine that is physically secure, and not from a computer that is in a public location, such as a lab or from an otherwise shared machine. On the other hand, logging in with a single click is terribly handy if you're using port forwarding.

  • If you aren't still logged in, login to your csoft account via ssh
  • At the prompt, type ssh-keygen
  • When it prompts you for a location to save your keys, press Enter
  • When prompted for a passphrase, press Enter
  • When prompted to enter the same passphrase again, press Enter
  • Type the command cat ~/.ssh/ >~/.ssh/authorized_keys
  • Type the command chmod 600 ~/.ssh/authorized_keys
  • With your SSH connection (and the port forwarding we set up earlier) still active, point your FTP client to localhost. Remember, a connection to localhost with port forwarding should connect you to csoft. Get the file ~/.ssh/identity and store it in your Tera Term program folder
  • Log out of your csoft account.
  • Restart the connection, only this time, when you are prompted for a password, check the Use RSA key to login radio button. Use the Private key file: button to browse to your file
  • Click OK, and you should be logged in

If your login worked, you're ready to complete the job of automating your login

  • From the Setup menu, choose SSH Authentication
  • In this dialog box, put your csoft login name in the User name field
  • Check the the Use RSA key to login radio button.
  • Use the Private key file: button to browse to your file
  • Click OK
  • Choose Save Setup from the Setup menu
  • Click OK to use the default ini file

Now we'll create a custom icon to fully automate this process. Use the following as the command line for the icon

  • "C:\Program Files\TTERMPRO\ttssh.exe" your-host:22 /ssh /ssh-autologin
Automation, port forwarding, etc. with multiple hosts

So far, our examples have dealt with using TTSSH for port forwarding for a single host. To use automation and port forwarding for multiple hosts, you'll need multiple ini files (to contain the key location and port forwarding settings) and multiple icons. Here are some tips:

  • You can create an ini file whenever you use the Save Setup step
  • Give the identity files you get from the hosts separate by placing them in different folders or giving them different names
  • When you create icons, specify ini files by adding /f=file.ini . For example, if I kept my csoft settings in a file in the Tera Term Pro program directory in a file named csoft.ini, I might have an icon using this command line: "C:\Program Files\TTERMPRO\ttssh.exe" your-host:22 /ssh /f=csoft.ini /ssh-autologin
  • For port forwarding to be effective, you should have only one connection with port forwarding active in place at a time. You can't forward localhost to two separate hosts.
  • Nita Daniel (nita at
© 2024 CubeSoft Communications
All Rights Reserved.