用ssh连接的方式访问virtual-box里面的虚拟机
2016-07-05 19:56
471 查看
0 安装ubuntu-server时,software selection时按tab键选择openssh-server
1 添加.bash_aliases(clear,ll -h,为了使用方便,非必须,与ssh登录也毫无关系)
2 Append the following lines at the end of the file /etc/network/interfaces:
auto eth1
iface eth1 inet dhcp
3 vim /etc/ssh/sshd_config,找到PasswordAuthentication no, 改为yes保存
4 sudo poweroff。
5 In VirtualBox Manager, choose the VM, then click the Settings button in the tool bar. This will invoke a window for VM configuration.
Select the Network category on the left.Select the Adapter 2 tab on the right.Enable "Adapter 2", and modify the Attached to attribute of Adapter 2 to Host-only Adapter. The Name attribute should become VirtualBox Host-Only Ethernet Adapter by default.
Now launch the VM
6 sudo ifconfig eth1,You should see some information about the network interface "eth1"。现在可以用类似“inet addr:192.168.56.102”这里面的ip地址加速putty连接virtualbox虚拟机里面的ubuntu-server了
1 添加.bash_aliases(clear,ll -h,为了使用方便,非必须,与ssh登录也毫无关系)
2 Append the following lines at the end of the file /etc/network/interfaces:
auto eth1
iface eth1 inet dhcp
3 vim /etc/ssh/sshd_config,找到PasswordAuthentication no, 改为yes保存
4 sudo poweroff。
5 In VirtualBox Manager, choose the VM, then click the Settings button in the tool bar. This will invoke a window for VM configuration.
Select the Network category on the left.Select the Adapter 2 tab on the right.Enable "Adapter 2", and modify the Attached to attribute of Adapter 2 to Host-only Adapter. The Name attribute should become VirtualBox Host-Only Ethernet Adapter by default.
Now launch the VM
6 sudo ifconfig eth1,You should see some information about the network interface "eth1"。现在可以用类似“inet addr:192.168.56.102”这里面的ip地址加速putty连接virtualbox虚拟机里面的ubuntu-server了
相关文章推荐
- Linux Generating SSH Keys
- perl脚本实现限制ssh最大登录次数(支持白名单)
- rsync ssh 数据同步分析
- 搭建SSH时的思考和遇到的几个问题的解决方法
- SSH框架网上商城项目第9战之添加和更新商品类别功能实现
- SSH框架网上商城项目第7战之整合Struts2和Json
- SSH 使用原理 与解释
- SSH整合中 hibernate托管给Spring得到SessionFactory
- Linux VPS利用SSH重置ROOT密码的方法
- SSH框架网上商城项目第15战之线程、定时器同步首页数据
- SSH框架网上商城项目第18战之过滤器实现购物登录功能的判断
- ssh,scp自动登陆的实现方法
- linux下使用ssh远程执行命令批量导出数据库到本地
- shell脚本实现ssh自动登录功能分享
- linux下ssh安装与scp命令使用详解
- ssh项目环境搭建步骤(web项目)
- 脚本实现SSH登录邮件报警
- SSH框架网上商城项目第21战之详解易宝支付的流程
- Linux SSH 安全策略 限制 IP 登录方法