# SSH連線操作 ### 安裝vi編輯器 1. 登入root帳號後,輸入`sudo apt update` 2. 再輸入`sudo apt install vim`,出現Do you want to continue? 請按y。 3. 跑完之後出現<span style="color:#0080FF;">Which services should be restarted </span> 按enter。 ### 設定SSH連線 1. 輸入`vi /etc/ssh/sshd_config` 2. 找到 PermitRootLogin 這一行,按a進入編輯模式,將前面的#刪除,後面的prohibit-password改成yes  3. 按Esc,再輸入`:wq!` 即可存檔離開。 4. 輸入`sudo systemctl restart ssh`,重啟ssh服務。 5. 輸入`ip a`,在eth0的地方可以找到這台虛擬機的IP,請記下來。  5. 打開git-bash,輸入`ssh root@172.x.x.x`(你剛剛查到的ip),再按enter。 6. 出現Are you sure you want to continue connecting? 請輸入yes,即可連線。 
×
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