vagrant + virtual box + rhel7 + ssh 登录

1、程序下载

vc++

https://download.visualstudio.microsoft.com/download/pr/1754ea58-11a6-44ab-a262-696e194ce543/3642E3F95D50CC193E4B5A0B0FFBF7FE2C08801517758B4C8AEB7105A091208A/VC_redist.x64.exe

virtualbox

https://download.virtualbox.org/virtualbox/7.0.18/VirtualBox-7.0.18-162988-Win.exe

vagrant

https://releases.hashicorp.com/vagrant/2.4.1/vagrant_2.4.1_windows_amd64.msi

Vagrant box generic/rhel7 - Vagrant Cloud (vagrantup.com)

2、新建文件夹并启动rhel7

powershell管理员身份运行

可以在D盘新建文件夹

mkdir d:/vm/rhel7/

cd D:/vm/rhel7/

复制代码
vagrant init generic/rhel7
vagrant up

3、修改私有地址为192.168.56.10

修改配置文件D:/vm/rhel/Vagrantfile

Create a private network, which allows host-only access to the machine

using a specific IP.

config.vm.network "private_network", ip: "192.168.56.10"

改完配置reload

vagrant reload#(需要在D:/vm/rhel7/目录下运行)

4、修改ssh配置远程登陆

sudo su切换至root

vi /etc/ssh/sshd_config

PasswordAuthentication yes#(允许密码登录)

PermitRootLogin yes#(允许root登录)

保存后service sshd restart

xshell远程用192.168.56.10登录

用户名:vagrant 密码: vagrant

相关推荐
kyle~3 小时前
机器视觉---Intel RealSense SDK 2.0 开发流程
运维·c++·windows·深度相机·intel realsense
数智大号3 小时前
超云发布R2425存储服务器:以全栈自研引领国产存储新方向
运维·服务器
亚林瓜子3 小时前
在amazon linux 2023上面通过Fedora 36软件仓库源安装tesseract5
linux·运维·服务器·ocr·tesseract·amazon·fedor
是专家不是砖家3 小时前
linux USB摄像头不停掉线问题
linux·运维·服务器
yuanManGan3 小时前
走进Linux的世界:初识进程(Task)
linux·运维·服务器
小马哥编程3 小时前
【软考架构】案例分析-瘦客户端C/S架构
运维·服务器·架构
老黄编程3 小时前
09-ubuntu20.04 执行 apt update时报错,是因为官网已停止维护不再更新的缘故吗?
linux·运维·服务器·ubuntu·数字证书
Supernova_Jun3 小时前
ffmpeg图片转视频
linux·运维·服务器
水月wwww3 小时前
ubuntu网络连接出错解决办法
linux·运维·计算机网络·ubuntu·操作系统·ubuntu网络连接
0wioiw03 小时前
Ubuntu(①shell脚本)
linux·运维·ubuntu