TTSSH command line
You can use the following command line parameters on TTSSH.
Options
- <username>@<host>[:<#TCP port>]
- A user can specify the user name in front of at-mark.
- <scheme>://[<username>[:<password>]@]<host>[:<TCP port>][/]
- A user can the URL format.
A user can specify ssh, ssh1, ssh2, slogin, slogin1 and slogin2 at the <scheme>.
If the port number is not specified, 22 is used as the port number and then TCPPort value in teraterm.ini file is ignored.
- /f=<file>
-
read teraterm.ini(file)
If this value is not a full path, it is understood as a relative path from configuration file folder.
- /ssh-f=<file>
-
read teraterm.ini(file)
If this value is not a full path, it is understood as a relative path from configuration file folder.
- /ssh-consume=<file>
-
After teraterm.ini file is read, it is erased.
If this value is not a full path, it is understood as a relative path from configuration file folder.
- /t=<value>
- value=2 SSH is enabled
- value=excluding 2 SSH is disable
- /nossh
- disable SSH connection
- /telnet
- disable SSH connection
And use Telnet protocol. It is same as /T=1 of Tera Term.
- /1
- connect to server with SSH1 protocol
- /ssh1
- connect to server with SSH1 protocol
- /2
- connect to server with SSH2 protocol
- /ssh2
- connect to server with SSH2 protocol
- /ssh-autologin
- try to autologin with empty password
- /ssh-autologon
- try to autologin with empty password
- /auth=<mode>
- try to autologin with the authentication method that is specified by <mode>.
- password Password Authentication
- publickey Public Key Authentication
- challenge SSH1:Challenge/Response(TIS) Authentication / SSH2:Keyboard-interactive Authentication
- keyboard-interactive Same as the challenge
- pageant Public Key Authentication with Pageant
- /user=<username>
- your username is specified
- /passwd=<password>
-
your password is specified
Please refer to Notes on Specifying a Password.
- /keyfile=<file>
-
your private key file is specified
If this value is not a full path, it is understood as a relative path from configuration file folder.
- /ask4passwd
-
disable autologin and ask for password
'/auth=<mode>' means only authentication method
- /ssh-L[<listen_addr>:]<port1>:<host>:<port2>[,[<listen_addr>:]<port1>:<host>:<port2>[,...]]
- port-forwarding from local listen-address(<listen_addr>) port(<port1>) to remote side host(<host>) port(<port2>)
if <listen_addr> is omitted, it listens at localhost.
- /ssh-R[<listen_addr>:]<port1>:<host>:<port2>[,[<listen_addr>:]<port1>:<host>:<port2>[,...]]
- port-forwarding from remote listen-address(<listen_addr>) port(<port1>) to local side host(<host>) port(<port2>)
if <listen_addr> is omitted, it listens at localhost.
<listen_addr> is not used with SSH1 protocol.
- /ssh-D[<listen_addr>:]<port>[,[<listen_addr>:]<port>[,...]]
- dynamic port-forwarding from local listen-address(<listen_addr>) port(<port>) to remote side host
Tera Term (ttssh) acts as a SOCKS proxy server.
if <listen_addr> is omitted, it listens at localhost.
- /ssh-X[[<hostname>]:<displaynumber>[.<screennumber>]]
- enable X11 forwarding
When the destination display is specified, the X11 connection is transferred to the display.
Or when the display is not specified, the transferred display will be determined.
- The X11Display entry of the [TTSSH] section in the teraterm.ini file
- The DISPLAY environment variable
- localhost:0.0
- /ssh-A
- enable agent forwarding
- /ssh-a
- disable agent forwarding
- /ssh-agentconfirm=<on/off>
-
- on confirm agent-forwarding request.
- off don't confirm agent-forwarding request.
- /ssh-v
- setup the log level to VERBOSE mode
- /ssh-C
- enable compression(level=6)
- /ssh-C=<level>
- enable compression with compression level(0-9)
- /ssh-c
- disable compression
- /ssh-icon=<icon name>
- specify the icon on SSH connection
Could be specified the same value of SSHIcon of setup file.
- /ssh-subsystem=<subsystem>
- invoke the subsystem that is specified by <subsystem> instead of shell.
- /ssh-N
- don't start a shell session when starting a connection.
- /nosecuritywarning
- suppress SSH security warning(known_hosts). THIS OPTION PROHIBITED.
NOTICE: This option was created for the purpose of realizing automatic testing of equipment
in local environment like as a factory. You must not use this option when your network
contains the security risk. Please at you own risk in every case.
If the parameter value can include the space character and semicolon, a user should put the value in quotations by using `"' character. (version 4.63(TTSSH 2.51) or later)
If the value includes the `"' character, the user should write the `"' character two times. (version 4.63(TTSSH 2.51) or later)
Old specification
If the value include the '@', the user should put write `@' character. If the value includes the `@' character, the user should write the `@' character two times. (version 4.10 to 4.62(TTSSH 1.08 to 2.50))
Example
ttermpro.exe server1:22 /ssh /ssh-L30025:smtpsrv1:25 /ssh-L30110:pop3srv1:110
ttermpro.exe server1:22 /ssh /ssh-D1080
ttermpro.exe server2:22 /ssh /ssh-X
ttermpro.exe server2:22 /ssh /ssh-Xlocalhost:3.0
ttermpro.exe server3:22 /ssh /2 /auth=password /user=guest /passwd=guest
ttermpro.exe server4:22 /ssh /2 /auth=publickey /user=admin /keyfile=pathofkeyfile /ask4passwd
ttermpro.exe ssh://user:password@server5/ /auth=password
ttermpro.exe server6:22 /ssh /2 /auth=publickey /user=guest /keyfile="C:\Users\foo\Documents\My keys\id_ed25519" /passwd="Yu/eA;G2"
ttermpro.exe server7:22 /ssh /2 /auth=password /user=guest /passwd="foo""bar"
Notes on Specifying a Password
If you specify a password as a command line argument for ttermpro.exe, the password can be viewed by checking the command line arguments of the running process.
It cannot be viewed without the appropriate permissions to access command line arguments, but it cannot be said that the possibility of misuse is completely eliminated.
Below are some cases in which a password may be specified, along with whether a workaround is available.
- Run with a command line arguments
-
Start using one of the following methods: from the Command Prompt, the "Run" dialog, or a shortcut.
ttermpro.exe server3:22 /ssh /2 /auth=password /user=guest /passwd=guest
When started in this way, the command line arguments of that process will be visible.
- File > Duplicate session
-
Tera Term internally generates command line arguments to launch ttermpro.exe. As a result, the command-line arguments of that process can be viewed.
- Specify command line arguments in the "Host" field of the New Connection dialog and connect
-
The "Host" field of the New Connection dialog can accept command line arguments.
If the Tera Term is not connected, Tera Term does not start new ttermpro.exe. There is no problem in this case.
If the Tera Term is already connected, Tera Term starts new ttermpro.exe with command line arguments. As a result, the command-line arguments of that process can be viewed.
The workaround is: "Do not start a new connection from an already connected Tera Term."
- Specify an argument of connect macro command
-
The argument of connect macro command is the argument used to lauch ttermpro.exe.
The connect macro command starts new ttermpro.exe when the Macro is not connected to Tera Term. As a result, the command-line arguments of that process can be viewed.
connect 'server3:22 /ssh /2 /auth=password /user=guest /passwd=guest'
If you first link to Tera Term and then run the connect command again, a new ttermpro.exe is not started.
; '/DS' option suppresses "New Connection" dialog
connect '/DS'
connect 'server3:22 /ssh /2 /auth=password /user=guest /passwd=guest'
- Start from TeraTerm Menu
-
TeraTerm Menu constructs command line arguments from the input values and starts ttermpro.exe. As a result, the command-line arguments of that process can be viewed.
A possible workaround is to write a macro as shown above and use the macro file instead of an SSH configuration.
Example: Pageant collaboration
Setup Pageant in the startup folder.
C:\usr\pageant.exe c:\usr\Identity.ppk
How to connect with the public key authentication by using Pageant is shown as follows.
ttermpro.exe shell.osdn.net:22 /ssh /auth=pageant /user=yutaka