###### tags: `Linux` # Linux HW04 操作步驟 ## 登入系統 指令: ```= ssh s1094845@10.2.200.196 ```  ## 伺服器端 ### 用 ssh-keygen 指令產生公鑰(id_rsa.pub)跟私鑰(id_rsa) ```= ssh-keygen cd ~/.ssh ls cat id_rsa.pub ```   ### 改權限,建立私鑰檔 把"~/.ssh"的檔案權限改成700, 把私鑰(id_rsa)的檔案權限改成600, 建立"~/.ssh/authorized_keys"這個檔案, 並把檔案權限改成600 ```= chmod 700 ~/.ssh chmod 600 ~/.ssh/id_rsa touch ~/.ssh/authorized_keys chmod 600 ~/.ssh/authorized_keys ```  ### append 公鑰 把公鑰(id_rsa.pub)的內容append到authorized_keys中 ```= cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys cd ~/.ssh ls cat id_rsa.pub cat authorized_keys ```  ## 客戶端 ### 把私鑰(id_rsa)載回客戶端 ```= scp -r s1094845@10.2.200.196:~/.ssh testssh ```   **複製到/user/.ssh**  ### 轉成ppk檔 用PuTTYgen轉成PieTTY支援的格式(用Load選擇All Files找id_rsa)    ### 修改PieTTY設定 * 設定ip  * 設定帳號  * 設定密碼  * 把設定存檔  * 完成  ## 登入成功  ## 重點檢查 ssh自動連線與連線後的帳號及hostname ```= lsb_release -a hostname //找IP ifconfig ``` 
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up