Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

第 39 章 OpenSSH

目录

39.1. 安装 OpenSSH
39.2. /etc/ssh/
39.2.1. IP地址限制
39.2.2. sshd_config
39.2.3. ssh_config
39.2.4. ~/.ssh/config
39.3. ssh client
39.3.1. -o option 参数详解
39.3.2. 调试模式,显示连接过程
39.3.3. 远程执行 Shell 支持彩色终端输出
39.4. OpenSSH Tunnel
39.4.1. SOCKS v5 Tunnel
39.4.2. 从公网穿透局域网
39.5. ssh-keygen — authentication key generation, management and conversion
39.5.1. .ssh/known_hosts
39.6. ssh-keyscan
39.7. ssh-copy-id - install your public key in a remote machine's authorized_keys
39.8. ssh-agent
39.8.1. ssh-add
39.8.2. Lock / Unlock agent
39.8.3. Set lifetime (in seconds) when adding identities.
39.9. OpenSSH for Windows
39.9.1. Putty Client
39.10. Google Authenticator - Android Apps on Google Play
39.11. 禁止SSH密码穷举
39.12. FAQ
39.12.1. Pseudo-terminal will not be allocated because stdin is not a terminal.
39.12.2. 去掉 passphrase
39.12.3. 打印调试信息
39.12.4. 远程执行 sudo 提示密码
39.12.5. Unable to negotiate with 47.97.19.5 port 60022: no matching host key type found. Their offer: ssh-dss,ssh-rsa

ssh 连接过程

	
(1)远程主机收到用户的登录请求,把自己的公钥发给用户.
(2)用户使用这个公钥,将登录密码加密后,发送回来.
(3)远程主机用自己的私钥,解密登录密码,如果密码正确,就同意用户登录.
	
	

39.1. 安装 OpenSSH

使用下面命令安装OpenSSH

sudo apt-get install ssh