1、在VirtualBox中安裝lubuntu
2、調整分辨率
--顯示當前使用分辨率及最大分辨率等信息
xrandr
顯示結果:(注意 VGA-1 標識,接下來要用到)
s@s-VirtualBox:~$ xrandr
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 16384 x 16384
VGA-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1920x1080 60.00 + 60.00
2560x1600 59.99 59.97
1920x1440 60.00
1856x1392 60.00
…
--添加要使用的分辨率並返回需要添加的mode信息
cvt 1920 1080
--根據上個命令要回顯的分辨率添加新的顯示模式
xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
xrandr --addmode VGA-1 1920x1080_60.00
--設置輸出,立即生效
xrandr --output VGA-1 --mode 1920x1080_60.00
3、在lubuntu中安裝SSH
sudo apt install openssh-server
4、設置網卡
網卡一用於聯網
網卡二用於與主機交換文件
windows下查看與VirtualBox連接的 IP地址
lubuntu下有兩個ip
我們使用與windows在同一個網段的IP192.168.56.102進行連接
5、windows安裝SSHSecureShellClient
6、windows打開SSH Secure File Transfer Client
點擊Quick Connect
輸入主機IP和用戶名
連接失敗,報錯
解決辦法:
修改ssh的配置文件:/etc/ssh/sshd_config
sudo vim /etc/ssh/sshd_config
在配置文件中添加如下信息
Ciphers aes128-cbc,aes192-cbc,aes256-cbc,aes128-ctr,aes192-ctr,aes256-ctr,3des-cbc,arcfour128,arcfour256,arcfour,blowfish-cbc,cast128-cbc
MACs hmac-md5,hmac-sha1,[email protected],hmac-ripemd160,hmac-sha1-96,hmac-md5-96
KexAlgorithms diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1,diffie-hellman-group-exchange-sha256,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group1-sha1,[email protected]
然後重啓SSH
sudo /etc/init.d/ssh restart
此時修改完成可以連接輸入密碼即可
補:在傳輸文件過程中遇到一個錯誤
在使用SSH Secure File Transfer工具從windows本地往Linux系統的VOD服務器上拷貝文件時,遇到了Encountered 1 errors during the transfer這個錯誤,然後網上查到是資源的路徑包含了“()”。