内容简介:这个东东能让你使用浏览器连接你远程的机器!下载请先配置好Golang环境,然后
这个东东能让你使用浏览器连接你远程的机器!
一. 环境准备
下载 https://github.com/yudai/gotty
请先配置好Golang环境,然后
go get github.com/yudai/gotty
否则请下载二进制文件
二. ssh到机器
在机器中命令执行
./gotty --port 9090 -c admin:12345 -w bash
打开浏览器 http://127.0.0.1:9090/
,输入帐号:admin,密码:12345
三. ssh到容器内
新建Dockerfile,在同一目录放入gotty二进制文件
FROM golang:1.8 ADD ./gotty /root/debug/gotty RUN chmod 755 /root/debug/gotty
build 镜像
docker build -t gotty .
运行该容器,暴露端口,并在容器内执行命令
docker run --rm -it -p 9090:9090 gotty /bin/bash /root/debug/gotty --port 9090 -c admin:12345 -w bash
以上所述就是小编给大家介绍的《从Web端ssh连接到机器或者机器内的容器》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!
猜你喜欢:- 解决因为机器性能问题导致docker-compose运行容器超时的问题
- ML.NET机器学习、API容器化与Azure DevOps实践(二):案例
- ML.NET机器学习、API容器化与Azure DevOps实践(一):简介
- ML.NET机器学习、API容器化与Azure DevOps实践(三):RESTful API
- ML.NET机器学习、API容器化与Azure DevOps实践(四):持续集成与k8s持续部署
- 容器技术之容器镜像篇
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Beginning Google Maps API 3
Gabriel Svennerberg / Apress / 2010-07-27 / $39.99
This book is about the next generation of the Google Maps API. It will provide the reader with the skills and knowledge necessary to incorporate Google Maps v3 on web pages in both desktop and mobile ......一起来看看 《Beginning Google Maps API 3》 这本书的介绍吧!