Docker使用系列三:CentOS 6.5 快速体验Ubuntu 14.04 可以ssh 登陆
2020-02-04 06:01
204 查看
所有操作都是用root账号在CentOS 6.5上完成,假设没有安装docker
依次使用root执行后面的命令就可以了
curl https://git.oschina.net/feedao/Docker_shell/raw/start/ali-centos.sh | sh yum -y install docker-io service docker start yum -y install debootstrap debootstrap --arch amd64 --include=vim,openssh-server,openssh-client trusty ubuntu-trusty http://mirrors.aliyun.com/ubuntu/ cd ubuntu-trusty && tar -c .|docker import - ubuntu1404-base docker build -t ubuntu1404-ssh https://git.oschina.net/feedao/Docker_shell/raw/start/trustyDockerfile docker run -d -p 127.0.0.1:33303:22 ubuntu1404-ssh
前面完成后,登陆容器:
ssh root@127.0.0.1 -p 33303
输入密码:123456
效果如下:
[root@localhost lists]# ssh root@127.0.0.1 -p 33303 root@127.0.0.1's password: Welcome to Ubuntu 14.04 LTS (GNU/Linux 2.6.32-431.11.2.el6.x86_64 x86_64) * Documentation: https://help.ubuntu.com/ Last login: Fri Apr 18 08:14:45 2014 from 172.17.42.1 root@0b26318a0d63:~# cat /etc/issue Ubuntu 14.04 LTS \n \l root@0b26318a0d63:~# uname -a Linux 0b26318a0d63 2.6.32-431.11.2.el6.x86_64 #1 SMP Tue Mar 25 19:59:55 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
这好像是个问题
转载于:https://my.oschina.net/feedao/blog/223873
- 点赞
- 收藏
- 分享
- 文章举报
相关文章推荐
- TeamViewer的下载、安装和使用(windows7、CentOS6.5和Ubuntu14.04(64bit))(图文详解)
- 使用SSH方式root帐号登陆ubuntu14.04
- SSH方式使用root登陆ubuntu14.04
- Docker使用系列六:CentOS 6.5 制作Docker DNS服务镜像
- 使用SecureCRT远程 SSH 登陆 CentOS 和 Ubuntu
- 学会使用Screen,不再惧怕SSH中断(树莓派、Ubuntu和Centos 6.5)
- Docker使用系列四:CentOS 6.5 制作自动授信Docker容器镜像
- CentOS 6.5 制作可以ssh登录的Docker镜像
- SSH方式使用root登陆ubuntu14.04
- Centos 限制root帐户登陆ssh并配置指定帐户可以使用sudo命令
- CentOS 6.5 使用docker 容器
- CentOS6.5使用yum快速搭建LAMP(Linux+Apache+MySQL+PHP)环境
- Centos6.5使用yum安装mysql——快速上手必备
- Centos6.5使用yum安装mysql——快速上手必备
- 使用yum快速升级CentOS 6.5内核到 3.10.28
- Ubuntu14.04桥接网络设置与SSH登陆
- wi7下面配置 git bash使用ssh公钥/私钥登陆centos
- ubuntu14.04 SSH免密码远程登陆
- Ubuntu14.04(32位)下安装使用docker