designetwork(EN)

IT technical memo of networking

SSH to CentOS with Chromebook Secure Shell public key authentication

f:id:daichi703n:20170202010439p:plain

With Secure Shell provided with Chromebook (Google Chrome), you can run Linux (CentOS) server without TeraTerm on Chromebook. In this procedure, switching to developer mode is unnecessary.

Generate public key

When generating a public key on a Chromebook, it is necessary to switch to the developer mode. However, since the key is generated on the Linux server side this time, switching to the developer mode is not necessary.

Generate the SSH public key / secret key on the Linux server as follows. The key generation is easy to carry out with logged in password authentication to already created operational users.

$ ssh-keygen
(Passphrase input as necessary)

id_rsa, id_rsa.pub is generated under ~/.ssh/. Register the public key in the authentication key list.

$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
$ chmod 700 ~/.ssh
$ chmod 600 ~/.ssh/authorized_keys

If the setting of file name and access right is incorrect, it becomes SSH connection error (SSH Error Code 255, etc.), so review and fix it.

Copy the public key / private key to the Chromebook

Copy the public key and secret key to your hand with the SFTP tool etc. In the case of TeraTerm etc., it is sufficient to use only the secret key, but Secure Shell also requires a public key.

chrome.google.com

Create a folder such as ssh under the “Download” folder and copy the key from the server. Unfortunately .ssh etc .(period) Starting folder can not be created. *Be careful not to put it on Google Drive!! There is a risk of leakage of private key!!

Set the key to Secure Shell

Be careful as this is different from TeraTerm etc. Click Import to select the key set.

f:id:daichi703n:20170202005417p:plain

Select one and press Shift + arrow to select the public key and secret key. (Sorry in JP’s figure)

f:id:daichi703n:20170202005441p:plain

The key is now imported.

f:id:daichi703n:20170202005500p:plain

If only the secret key is selected, the selected key is not displayed (imported) in the pull down list.

You can connect via SSH by connecting with this. Display is a pattern with pass phrase. Passphrase is requested instead of password. If a password is requested here, the SSH setting is incorrect.

f:id:daichi703n:20170202005643p:plain

How to delete a key set

When the key selection is wrong, it can be deleted as follows.

DEL key with state selected with Identity

On my Chromebook Acer C720 you can send DEL commands with Search + BackSpace.

Detailed manuals are listed here.

chromeapps/nassh/doc/faq.txt - chromiumos/platform/assets - Git at Google

Conclusion - SSH to CentOS with Chromebook Secure Shell public key authentication

By generating keys on the Linux (CentOS) server side, public key authentication SSH connection with Secure Shell can be established without setting Chromebook to developer mode. Unlike TeraTerm etc., it is necessary to read the public key / secret key to the client with a set.


This Blog is English Version of my JP's.

Sorry if my English sentences are incorrect.

designetwork