Xhost知識庫 - 使用SSH連線虛擬機器


1. 請到 面板->您要SSH的虛擬機器->Startup(啟動)

2. Docker Image請選擇以下其中一種

Debian 12

3. 請到Console(控制台)

4. 點選 Start 開啟虛擬機器,並等待開機完畢

5. 於控制台輸入帳號「root」(Debian 12)並Enter,然後輸入密碼「您於啟動設定的Password」(Debian 12)

6. 輸入以下指令

以網路執行腳本(cURL、wget擇一)

sudo su -c "bash <(curl -s https://cdn.xhost.tw/shell/ssh.sh)" root
sudo su -c "bash <(wget -qO- https://cdn.xhost.tw/shell/ssh.sh)" root

或直接輸入指令

sudo sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
sudo systemctl restart ssh
sudo systemctl restart sshd