ssh訪問vmware8中的linux系統

來源:互聯網
上載者:User

ssh訪問vmware8中的linux系統 Vmware的網路設定採用NAT方式,希望通過ssh實現在本地WIN7系統下訪問虛擬機器中的Linux系統。1.做地址、連接埠映射。開啟Virtual Network Editor (在Edit菜單裡,或在VMware Home介面菜單)。選中NAT那個項目,開啟NAT Setting頁,點擊Port Forwarding -> Add …Host Port:22 (主機中的要進行映射的連接埠)Virtual Machine IP address : 192.168.253.128 22 (映射到哪個IP(IP地址可在linux中通過ifconfig查看),哪個連接埠)Description: SSH Virtual port (簡要描述)2.確認Linux的SSH服務已經開通* ssh是一種可以代替telnet的一種遠端管理的方式.並且具有安全\快捷等優點的一種服務.* 在shell視窗執行setup命令,選擇system service啟動sshd服務.* 在/etc/ssh/sshd_config檔案中,將PermitRootLogin no|yes設定為允許root使用者遠程登入,否則雖然能串連上,但是卻不能登入.3.查看Linux與windows中系統的防火牆設定,關閉它或者開啟22連接埠。在linux下關閉防火牆:在ROOT許可權下,停掉防火牆:#service iptables stop#chkconfig iptables off============================================================* 永久性生效,重啟後不會複原開啟: chkconfig iptables on關閉: chkconfig iptables off* 即時生效,重啟後複原開啟: service iptables start關閉: service iptables stop在windows下開啟22連接埠通過開啟windows下的SSH服務或者通過netstat –an 查看22連接埠是否開啟通過ssh訪問虛擬機器下的linux系統:通過SecureCRT去串連4.關閉VMware到系統托盤:開啟VMware的 Edit -> Preferences -> Workstation -> Keep VMs running after Workstation closes5.讓fedora預設以文字介面啟動,減少記憶體佔用:sudo ln -s /lib/systemd/system/multi-user.target /etc/systemd/system/default.target

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.