开启Kali的sshd连接
- ⚠️ Tips:kali默认的sshd是关闭的,需要人为打开
- 操作步骤:
- 修改/etc/ssh/sshd_config
查找如下:
# Authentication: LoginGraceTime 2m PermitRootLogin prohibit-password StrictModes yes
- 将查找到的修改如下样子:
# Authentication: LoginGraceTime 2m PermitRootLogin yes StrictModes yes
- 打开ssh服务,并设置成开机自启动
systemctl start ssh systemctl enable ssh
安装Docker
1、curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
2、echo 'deb Index of linux/debian/ stretch stable'> /etc/apt/sources.list.d/docker.list
3、apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common
4、apt-get update
5、sudo apt install docker.io
安装Docker-Compose
启动docker:
sudo systemctl start docker
开机自动启动:
sudo systemctl enable docker
安装pip
curl -s https://bootstrap.pypa.io/get-pip.py| python3
安装docker-compose
pip install docker-compose
重启服务
systemctl daemon-reload
systemctl restart docker
开启容器
docker-compose up -d
关闭容器
docker-compose down