VMWare使用小记

11次阅读

共计 615 个字符,预计需要花费 2 分钟才能阅读完成。

CentOS7 1810
虚拟机网络 -> 网卡 1 桥接网卡, 网卡 2 Host-Only
设置 SSH,putty 可登录

sudo dhclient
yum install -y openssl openssh-server

# 修改配置文件
vi /etc/ssh/sshd_config
# 关闭注释:PermitRootLogin,PubkeyAuthentication
# 在文件最后添加两行
# Port 22
# Protocol 2

# Protocol 2(第二代 ssh)
# RSAAuthentication(第二代 ssh 弃用)

#启动 ssh,开机启动 ssh
systemctl start sshd.service
systemctl enable sshd.service

#取得虚拟机 ip, 此 ip 可供 putty 和 winscp 登录
ip addr

设置 FTP,winscp 通过 22 端口可以访问

yum install iptables-services
systemctl mask firewalld.service
systemctl stop firewalld.service

service vsftpd start
service vsftpd restart
chkconfig vsftpd on

#打开访问端口,例如 3306(mysql)
vi /etc/sysconfig/iptables

systemctl enable iptables.service
systemctl enable ip6tables.service

正文完
 0