sshd默认配置

/etc/sshd_config
Include /etc/ssh/sshd_config.d/*.conf
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
SyslogFacility AUTHPRIV
LogLevel INFO
PermitRootLogin yes
AllowUsers *
PubkeyAuthentication yes
PasswordAuthentication yes
#PermitEmptyPasswords yes
AuthorizedKeysFile .ssh/authorized_keys
HostbasedAuthentication yes
IgnoreUserKnownHosts yes
IgnoreRhosts yes
GSSAPIAuthentication no
GSSAPICleanupCredentials yes
UsePAM no
X11Forwarding yes
UseDNS no
AcceptEnv LANG LC_*
Subsystem	sftp	/usr/lib/openssh/sftp-server
/etc/ssh_config
Include /etc/ssh/ssh_config.d/*.conf
Host *
PasswordAuthentication yes
GSSAPIAuthentication yes
ForwardX11Trusted yes
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_dsa
IdentityFile ~/.ssh/id_ecdsa
IdentityFile ~/.ssh/id_ed25519
SendEnv LANG LC_*
HashKnownHosts yes

sudo ssh-keygen -A
ssh-keygen -t rsa
touch ~/.ssh/authorized_keys
cat ~/.ssh/id_rsa.pub > ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/*
sudo service sshd stop
sudo service sshd start
sudo service sshd status
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值