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

第 31 章 OpenSSH

目录

31.1. 安装 OpenSSH
31.2. /etc/ssh/
31.2.1. IP地址限制
31.2.2. sshd_config
31.2.3. ssh_config
31.2.4. ~/.ssh/config
31.3. ssh client
31.3.1. -o option 参数详解
31.3.2. 调试模式,显示连接过程
31.4. OpenSSH Tunnel
31.4.1. SOCKS v5 Tunnel
31.4.2. 从公网穿透局域网
31.5. ssh-keygen — authentication key generation, management and conversion
31.5.1. .ssh/known_hosts
31.6. ssh-keyscan
31.7. ssh-copy-id - install your public key in a remote machine's authorized_keys
31.8. ssh-agent
31.8.1. ssh-add
31.8.2. Lock / Unlock agent
31.8.3. Set lifetime (in seconds) when adding identities.
31.9. OpenSSH for Windows
31.9.1. Putty Client
31.10. Google Authenticator - Android Apps on Google Play
31.11. 禁止SSH密码穷举
31.12. FAQ
31.12.1. Pseudo-terminal will not be allocated because stdin is not a terminal.
31.12.2. 去掉 passphrase
31.12.3. 打印调试信息
31.12.4. 远程执行 sudo 提示密码
31.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)远程主机用自己的私钥,解密登录密码,如果密码正确,就同意用户登录.
	
	

31.1. 安装 OpenSSH

使用下面命令安装OpenSSH

sudo apt-get install ssh