Mac遠端訪問Ubuntu
阿新 • • 發佈:2019-06-24
MacOS和Ubuntu連線到同一個網路
使用ping命令可以通訊即可。
SSH
使用SSH可以很方便的在MacOS上訪問Ubuntu,不過只能用命令列操作,相當於連線了Ubuntu的終端。
1. Ubuntu上安裝SSH
sudo apt-get install openssh-server
2. Ubuntu上啟動SSH
sudo /etc/init.d/ssh start
3. MacOS上連線Ubuntu
開啟Mac上的終端,輸入:ssh 使用者名稱@IP
VNC
使用VNC就可以在MacOS上訪問Ubuntu的介面了。
1. Ubuntu上安裝x11VNC
sudo apt-get install x11vnc
命令:x11vnc -storepasswd
顯示並輸入密碼:
Enter VNC password: *********
Verify password: *********
Write password to /home/USERHOME/.vnc/passwd? [y]/n y
Password written to: /home/rahul/.vnc/passwd
3. 開啟服務
x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport 5900 -shared
4. MacOS連線Ubuntu桌面
Mac上開啟螢幕共享,輸入IP和密碼。