SSH的三层协议
1 连接层(管理多个通道,和应用程序打交道,做为其它上层应用的数据源)
2 认证层(对客户端认证,提供密码和公钥等多种认证方式)
3 传输层(加密,MAC,压缩)
传输层
1 建立tcp连接
2 对服务器进行公钥认证
3 协商,生成secret(对称加密的密钥)
认证层
1 密码认证
2 公钥认证
连接层
对同一个session提供各种channel
ssh对目录权限的限制可以通过chroot来实现
The Unix system call chroot causes a process to treat a given directory as the root directory
Any attempt to cd outside the subtree rooted at the given directory fails
This is useful for restricting a user or process to a subset of a filesystem for security reasons










网友评论