Open mikuQ opened 3 months ago
概述
/etc/ssh/
~/.ssh/
全局配置参数
/etc/ssh/sshd_config
/etc/issue
Banner /etc/issue
systemctl enable --now sshd #设置开机启动并立即启动 systemctl daemon-reload #加载systemd配置 systemctl reload sshd #加载sshd配置 systemctl restart sshd #重启sshd systemctl status sshd #查sshd ssh miku@192.168.100.100 #SSH登录
配置支持的密钥类型
# HostKey /etc/ssh/ssh_host_rsa_key # HostKey /etc/ssh/ssh_host_ecdsa_key HostKey /etc/ssh/ssh_host_ed25519_key
设置免密登录
ssh-keygen -t ecdsa/ed25519
ssh-keygen #生成密钥对 ssh-copy-id miku@192.168.100.100 #复制公钥到对端 ssh miku@192.168.100.100 #免密登录对端
OpenSSH
概述
/etc/ssh/
目录中~/.ssh/
中全局配置参数
/etc/ssh/sshd_config
/etc/issue
Banner /etc/issue
配置支持的密钥类型
/etc/ssh/sshd_config
中的相关HostKey行禁止密钥类型设置免密登录
ssh-keygen -t ecdsa/ed25519