| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 6 |
<title>SSH connection</title> |
| 7 |
<META http-equiv="Content-Style-Type" content="text/css"> |
| 8 |
<link rel="stylesheet" href="../style.css" type="text/css"> |
| 9 |
</head> |
| 10 |
|
| 11 |
<body> |
| 12 |
<h1>SSH connection</h1> |
| 13 |
|
| 14 |
<p> |
| 15 |
Description of SSH connection which is a feature of Tera Term. |
| 16 |
When the TTSSH module is installed, Tera Term supports the SSH connection. |
| 17 |
</p> |
| 18 |
|
| 19 |
<h2 id="prerequisite">Prerequisite</h2> |
| 20 |
|
| 21 |
<p> |
| 22 |
SSH is composed of two protocols, namely SSH1 and SSH2. Be careful that SSH2 is NOT upward compatible of SSH1. These protocols should be chosen carefully according to the host to be connected. TTSSH supports both protocols. |
| 23 |
</p> |
| 24 |
|
| 25 |
<p> |
| 26 |
There are several ways of authentication methods of SSH as follows |
| 27 |
</p> |
| 28 |
<ul> |
| 29 |
<li>Password authentication</li> |
| 30 |
<li>Public Key (and Private key pair) authentication |
| 31 |
<ul> |
| 32 |
<li>By using the PuTTY authentication agent `Pagent'.</li> |
| 33 |
</ul> |
| 34 |
</li> |
| 35 |
<li>rhosts authentication for SSH1</li> |
| 36 |
<li>challenge/response(TIS) authentication for SSH1</li> |
| 37 |
<li>keyboard-interactive authentication for SSH2</li> |
| 38 |
</ul> |
| 39 |
<p> |
| 40 |
In this document, we will describe Password authentication and Key-pair authentication which would be most widely used. |
| 41 |
</p> |
| 42 |
|
| 43 |
<h2 id="connproc">Procedure of connection</h2> |
| 44 |
|
| 45 |
<p> |
| 46 |
When Tera Term is activated, the following dialog will let you choose a way of connecting. |
| 47 |
</p> |
| 48 |
<div class="img"><img src="../image/NewConnection.png" alt="connection dialog"></div> |
| 49 |
<p> |
| 50 |
When using SSH, you should match SSH version to the host to be connected. |
| 51 |
</p> |
| 52 |
|
| 53 |
<p id="ssh_auth_dialog"> |
| 54 |
Once connected, then you will be prompted to select authentication method in a dialog.<br /> |
| 55 |
You can change default value of this dialog in <a href="../menu/setup-sshauth.html">"TTSSH: Authentication Setup" dialog</a> |
| 56 |
</p> |
| 57 |
<div class="img"><img src="../image/Authentication.png" alt="Authentication method"></div> |
| 58 |
<p> |
| 59 |
The TTSSH can support some authentication methods and a user should select one of methods. When an authentication method is failed, the TTSSH does not retry to authenticate another method.<br> |
| 60 |
For example, the OpenSSH client will be able to login to the server without regard to the difference the password and the keyboard-interactive authentication. However, the TTSSH can not login to the server which only enabled keyboard-interactive and public key authentication by using the password authentication. |
| 61 |
</p> |
| 62 |
<ul> |
| 63 |
<li>If you want to use Password authentication, then make sure that [Use plain password to log in] is chcked and type in username and password. If they are correct, you can login.<br> |
| 64 |
NOTE: The password can not be sent as plain text like TELNET protocol because the SSH packet including the password data is encrypted.</li> |
| 65 |
<li>When using public key authentication, check [RSA/DSA/ECDSA/ED25519 key to log in] (second from the top line) and click [Private key file:] to specify Private key file. Then type in username and Private key pass phrase.<br> |
| 66 |
Note: TTSSH 2.63(Tera Term 4.76) later can support the PuTTY format and SECSH(ssh.com) format of the SSH2 private key.</li> |
| 67 |
<li>When the keyboard-interactive authentication is used, check the [Use keyboard-interactive to log in] and input your user name.<br> |
| 68 |
Next, the dialog with the server prompt and string is shown and input your password.</li> |
| 69 |
<li>When the Pageant is used, check the [Use Pageant] and input your user name.</li> |
| 70 |
</ul> |
| 71 |
|
| 72 |
<h3 id="username_input">Inputing Username</h3> |
| 73 |
<p> |
| 74 |
When this dialog is displayed, |
| 75 |
username was entered according the <a href="../menu/setup-sshauth.html#DefaultUserName">setting</a>. |
| 76 |
</p> |
| 77 |
<p> |
| 78 |
In addition, when the username is entered, or when the focus is moved from the input field after inputing username, |
| 79 |
the server is accessed according to the <a href="../menu/setup-sshauth.html#CheckAuthListFirst">setting</a>. |
| 80 |
</p> |
| 81 |
<p> |
| 82 |
You can select an option by pushing the button next to the username box. |
| 83 |
If username is empty, tab key moves focus to this button. |
| 84 |
If username was enterd, tab key moves focus to password and passphrase input box. |
| 85 |
<dl> |
| 86 |
<dt>Use default usename</dt> |
| 87 |
<dd>Default username was entered according the <a href="../menu/setup-sshauth.html#DefaultUserName">setting</a>. |
| 88 |
You can not select when default username is empty. |
| 89 |
</dd> |
| 90 |
</dl> |
| 91 |
|
| 92 |
<dl> |
| 93 |
<dt>Use logon usename</dt> |
| 94 |
<dd>Windows logon username was entered</dd> |
| 95 |
</dl> |
| 96 |
</p> |
| 97 |
|
| 98 |
<h3 id="passwd_input">Inputing Password and Passphrase</h3> |
| 99 |
<p> |
| 100 |
The password and passphrase input box differs from normal dialog box. |
| 101 |
</p> |
| 102 |
<ul> |
| 103 |
<li>Control character(0x01 - 0x1F) can be inputted by Control + A - Z, [, \, ], ^ and _.</li> |
| 104 |
<li>Control + V can not be used because the key equals SYN (0x16). Please use Shift + Insert combination for pasting.</li> |
| 105 |
</ul> |
| 106 |
<p> |
| 107 |
You can select an option by pushing the button next to the username field. |
| 108 |
<dl> |
| 109 |
<dt>Paste from clipboard</dt> |
| 110 |
<dd>Paste from clipboard to password input box</dd> |
| 111 |
|
| 112 |
<dt>Paste from clipboard and clear clipboard</dt> |
| 113 |
<dd>Paste from clipboard to password input box, And clear clipboard</dd> |
| 114 |
|
| 115 |
<dt>Use control characters</dt> |
| 116 |
<dd>If checked, you can enter control characters, |
| 117 |
but you can not perform operations such as paste clipboard paste with Control + V. |
| 118 |
If it is not checked, you can not enter control characters, |
| 119 |
but you can perform operations such as paste the clipboard with Control + V. |
| 120 |
</dd> |
| 121 |
|
| 122 |
<dt>Show passphrase</dt> |
| 123 |
<dd>You can choose to display the passphrase or not</dd> |
| 124 |
</dl> |
| 125 |
</p> |
| 126 |
|
| 127 |
<h2 id="securitywarning">Security Warning</h2> |
| 128 |
|
| 129 |
<h3 id="known_hosts">ssh_known_hosts file</h3> |
| 130 |
|
| 131 |
<p>On SSH connection, Tera Term searches the server host key into the ssh_known_hosts file. If the host key can not be found, the security warning is shown.<br /> |
| 132 |
The result is described below.</p> |
| 133 |
|
| 134 |
<ul> |
| 135 |
<li>No host key in ssh_known_hosts.</li> |
| 136 |
<li>Mismatching the host key type found in ssh_known_hosts.</li> |
| 137 |
<li>Mismatching the host key found in ssh_known_hosts.</li> |
| 138 |
<li>Matching the host key found in ssh_known_hosts(not warning).</li> |
| 139 |
</ul> |
| 140 |
|
| 141 |
<p>When the security warning message is shown, a user will receive a network attack known as spoofing secretly redirecting the user's connection to a different server. <br /> |
| 142 |
However, this message will be shown when a user connects to a server for the first time and the server's host key is newly updated by reinstalling the server computer. If a user will see this warning, please compare a fingerprint on the warning dialog to the trusted fingerprint. </p> |
| 143 |
|
| 144 |
<p>OpenSSH: The server administrator can get the fingerprint(hash) of the server's host key by using below command.</p> |
| 145 |
|
| 146 |
<pre>ssh-keygen -l -f /etc/ssh/ssh_host_rsa_key.pub</pre> |
| 147 |
|
| 148 |
<h3 id="VerifyHostKeyDNS">SSHFP RR</h3> |
| 149 |
|
| 150 |
<p>When a user is using SSH to connect to a server, the user can use SSHFP RR (Secure SHell FingerPrint Resource Record) defined in RFC 4255. However, this feature is experimentally implemented because the current Tera Term can not do the DNSSEC verification.</p> |
| 151 |
|
| 152 |
<p>A domain owner can register the SSHFP record into the DNS zone. The client software(Tera Term) can get the SSHFP record on connection and verify the record with the server's host key. <br /> |
| 153 |
However, this feature can be used on Windows 2000 or later by the limitation of the Windows resolver.</p> |
| 154 |
|
| 155 |
<p>Please refer to below one sentence in RFC 4255. <br /> |
| 156 |
<i>A public key verified using this method MUST NOT be trusted if the SSHFP resource record (RR) used for verification was not authenticated by a trusted SIG RR.</i><br /> |
| 157 |
The DNSSEC verification always fails because the Windows resolver used by Tera Term can not verify the DNSSEC signature. </p> |
| 158 |
|
| 159 |
<h2 id="generate">Generating Key</h2> |
| 160 |
|
| 161 |
<p> |
| 162 |
Here, we will describe how to generate Public/Private key pair. To generate key, select [Setup] |
| 163 |
menu and choose [SSH KeyGenerator...]. |
| 164 |
</p> |
| 165 |
<div class="img"><img src="../image/SelectKeyGenerator.png" alt="Choosing key generation"></div> |
| 166 |
<p> |
| 167 |
Then you will see a dialog of key generation. |
| 168 |
</p> |
| 169 |
<div class="img"><img src="../image/KeyGenerator.png" alt="Key generation dialog"></div> |
| 170 |
<p> |
| 171 |
[Key type] is to select key types - [RSA1] for SSH1 protocol and [RSA], [DSA], [ECDSA] or [ED25519] for SSH2 protocol should be chosen respectively. After choosing key type, you will be prompted for pass phrase by clicking [Generate] button. Type in pass phrase (like a password, but it can include blank and usually much longer than password). Then click [Save public key] |
| 172 |
button, [Save private key] button to save these keys. File name can be left as default if you don't need. At the completion, click [Cancel] to finish this process. |
| 173 |
</p> |
| 174 |
|
| 175 |
<p> |
| 176 |
For this file, when it is saved as default, all files which have an extension of [pub] (public key) will be stored in the specified location in the server (usually, it is (home directory)/.ssh/authorized_keys). All files which have NOT an extension are recognized as private key and you have to specify it at login. |
| 177 |
</p> |
| 178 |
|
| 179 |
<p> |
| 180 |
<em>Note: </em>Since Private key should not be disclosed to other party, please be careful to make it secret. Please make that it is NOT sent to server by accident. |
| 181 |
</p> |
| 182 |
|
| 183 |
</body> |
| 184 |
</html> |