执行sudo docker run -it -p 127.0.0.1:10001(2):22 ubuntu:16.04(18.04) /bin/bash
将10001端口映射到22端口上
1.更新源:apt update
2.安装opssh apt-get install openssh-server
3.安装vim apt install vim
4.将/etc/ssh/sshd_config中的root用户禁止登录给改成允许
5.重启ssh服务service ssh restart
配置免密登录:
将主机上的公钥发送到容器的~/.ssh/authorized_keys中
注意:ubuntu16.04的免密登录如果要从远程资源管理器启动的话,不仅要将服务器上的公钥发送到容器中,本机的公钥也发送过去才能实现远程资源管理器免密登录
vsc登录时需要先从服务器上登录一次,在文件knowhost中有记录docker容器信息后才能使用vscode登录
配置vscode:
Host ubuntu.20HostName 82.157.114.13User ubuntu//远程服务器配置Host ubuntu.18HostName 127.0.0.1User rootPort 10002ProxyCommand ssh ubuntu@ubuntu.20 -W %h:%p//docker-ubuntu18配置Host ubuntu.16HostName 127.0.0.1User rootPort 10001ProxyCommand ssh ubuntu@ubuntu.20 -W %h:%p//docker-ubuntu16配置
尝试连接。。。
pwn工具:
1.安装git:apt install git-all
2.安装pwndbg,peda
linux pwndbg 和 peda安装
3.安装pwngdb
linux pwndbg和peda的安装(2)
安装pwntools
pip3 install https://mirrors.aliyun.com/pypi/simple/ pwntools
ubuntu16安装pwntools参考这篇
https://blog.csdn.net/song_lee/article/details/107286686
中文设置参考这篇
https://blog.csdn.net/AsynSpace/article/details/86293500
