Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VioletVivirand/5c4aad6bd3947d114e739c67638c219e to your computer and use it in GitHub Desktop.
Save VioletVivirand/5c4aad6bd3947d114e739c67638c219e to your computer and use it in GitHub Desktop.

1. Generate Keys

在 Server 上執行:

ssh-keygen -t rsa -b 2048
cd ~/.ssh
cat ./id_rsa.pub >> ./authorized_keys

註:known_hosts 檔案是 Client 端信任的 Server 列表, authorized_keys 檔案則是在 Server 端信任的 Client 列表

2. Get Private Key

在 ChromeBook or Chrome OS 上,想個辦法下載 id_rsa (Private Key) 檔案,放到 ChromeBook 的使用者預設下載目錄。

小心別讓 ChromeBook 把 Private Key 加上 .txt 的副檔名。

3. SSH

在 ChromeBook 或 Chrome OS 上,先按下 Ctrl + Alt + T,接著輸入:

crosh> ssh
crosh> host <hostname>
crosh> user <username>
crosh> key <key>
crosh> connect

同場加映:Mac OS X 登入指令:

ssh <username>@<host> -i <key file path>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment