FinalSehll连接物理机时,点击链接,弹出输入密码对话框,输入正确密码,两秒钟依旧会弹出输入密码提示框,直至超过默认输入次数,报错:too many authentication failures。
此时应该首先保证正确编辑SSH连接:
Windous上用户名一般都设置为root,但是UOS/Ubuntu并不识别,如果用户名是root,出现该情况时,请将root改为该普通用户的用户名,点击确定,进行连接,成功即可,若不成功,需要修改FinalShell的sshd_config配置文件。
打开终端,输入
sudo vi /etc/sshd/config
ssh_config是服务端主配置文件,这个文件的宿主应当是root,最大权限可为“644”
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
# If you want to change the port on a SELinux system, you have to tell
# SELinux about this change.
# semanage port -a -t ssh_port_t -p tcp #PORTNUMBER <==在开启selinux的系统上,修改ssh端口的要修改selinux规则,用此命令修改
#
#Port 22 <==默认ssh端口,生产环境中建议改成五位数的端口
#AddressFamily any <==地址家族,any表示同时监听ipv4和ipv6地址
#ListenAddress 0.0.0.0 <==监听本机所有ipv4地址
#ListenAddress :: <==监听本机所有ipv6地址
HostKey /etc/ssh/ssh_host_rsa_key <==ssh所使用的RSA私钥路径
#HostKey /etc/ssh/ssh_host_dsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key <==ssh所