SSH Install
1 | # 必须安装passwd |
SSH Install2
1 | # 必须安装passwd |
id_rsa
1 | chmod 0600 id_rsa |
1 | xxxx |
authorized_keys
1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxlCDiJkFEK+cI9i1RltBdzhmkpEOHxGaqJh9CXzkmWRCYE1IaqBQ3ev+kHMShMX48crpdv1mHVrMvt9Kpo7PhkZem+Pd5i+PMVw53MY3Ow0ntoaqK0nBclDieJNmb32BfdI19nm4j6bSyyh8IMmYPsBfTR5wO+5u4cZxXb4I4mocVtvQXa3g7yZHaeEAVL9WfCrWM8/tH/7sAcP3pxdIuoIht/dMBU6wbRt7oPPC7pgw4uDq6y0sHv5SR9zlrmyqusZHDkg+BUaaFnsxnwREuC5Ll1q6ufqNBoUhTETxmZTaqMiwXyKb3gIer8BVctLRoKstNxX08CBiM/1RNzFX3 1144560553@qq.com |
id_rsa.pub
1 | ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxlCDiJkFEK+cI9i1RltBdzhmkpEOHxGaqJh9CXzkmWRCYE1IaqBQ3ev+kHMShMX48crpdv1mHVrMvt9Kpo7PhkZem+Pd5i+PMVw53MY3Ow0ntoaqK0nBclDieJNmb32BfdI19nm4j6bSyyh8IMmYPsBfTR5wO+5u4cZxXb4I4mocVtvQXa3g7yZHaeEAVL9WfCrWM8/tH/7sAcP3pxdIuoIht/dMBU6wbRt7oPPC7pgw4uDq6y0sHv5SR9zlrmyqusZHDkg+BUaaFnsxnwREuC5Ll1q6ufqNBoUhTETxmZTaqMiwXyKb3gIer8BVctLRoKstNxX08CBiM/1RNzFX3 1144560553@qq.com |
Problem
- System is booting up. Unprivileged users are not permitted to log in yet
Docker Install
- Dockerfile
1 | FROM centos:centos8 |
- Build
1 | docker build -t sshd:centos8 . |
- Run
1 | docker run -itd -p 2222:22 sshd:centos8 |
- Connect
1 | ssh localhost -p 2222 |
USE
1 | ssh root@9.135.10.2 -p 36000 -P |