【Linux】ssh登录出现Access denied password问题
文章目录
- 步骤1. 修改sshd_config文件
- 步骤2. 重启服务
步骤1. 修改sshd_config文件
修改文件/etc/ssh/sshd_config
为如下内如:
尤其注意需要将
UsePAM yes
注释为# UsePAM yes
样式。
# $OpenBSD: sshd_config,v 1.101 2017/03/14 07:19:07 djm Exp $# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin# 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.Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
#HostKey /etc/ssh/ssh_host_ed25519_key# Ciphers and keying
#RekeyLimit default none# Logging
#SyslogFacility AUTH
#LogLevel INFO# Authentication:#LoginGraceTime 2m
PermitRootLogin yes
#PermitRootLogin without-password
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10PubkeyAuthentication no# Expect .ssh/authorized_keys2 to be disregarded by default in future.
#AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2#AuthorizedPrincipalsFile none#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no
PermitEmptyPasswords yes# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication and
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication via ChallengeResponseAuthentication may bypass
# the setting of "PermitRootLogin without-password".
# If you just want the PAM account and session checks to run without
# PAM authentication, then enable this but set PasswordAuthentication
# and ChallengeResponseAuthentication to 'no'.
#UsePAM yes#AllowAgentForwarding yes
#AllowTcpForwarding yes
#GatewayPorts no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS no
#PidFile /var/run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none# no default banner path
#Banner none# Allow client to pass locale environment variables
AcceptEnv LANG LC_*# override default of no subsystems
Subsystem sftp /usr/lib/openssh/sftp-server# Example of overriding settings on a per-user basis
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server
步骤2. 重启服务
然后重启服务:service sshd restart
【Linux】ssh登录出现Access denied password问题相关推荐
- MTPuTTY连接Ubuntu\Linux SSH登陆出现Access Denied错误
目录 一.异常错误 二.原因 三.解决方法 1.进入root用户 2.进入/etc/ssh/目录 3.添加PermitRootLogin yes 4.重启SSH 5.SSH重新连接Ubuntu 一.异 ...
- linux文件access denied,Linxu系统使用SSH报错Access Denied怎么办?
一些Linux用户在登录SSH的时候,出现了Access Denied错误,面对这个问题,Linux用户们该如何进行解决呢?现在就让小编来给大家介绍一个解决的方法吧,有需要的用户快来看看吧. 解决方法 ...
- Linux连接mysql 出现Access denied for user ‘root‘@‘localhost‘(using password: YES)错误解决方案
Linux连接mysql 出现Access denied for user 'root'@'localhost'(using password: YES)错误解决方案 参考文章: (1)Linux连接 ...
- Linux SSH登录被拒绝:Server refused our key
使用SSH公钥远程登录服务器,出现Server refused our key;同时,输入正确的用户名及密码出现Access Denied 本地登录服务器,查看auth.log:使用命令:tail - ...
- denied 登陆后access_Linxu SSH登陆出现Access Denied错误的解决方法
其实这个问题是从 SCP 过来的.用 SCP 在两台 Linux 服务器之间传送备份文件.输入完 root 密码后,总是出现 Permission denied, please try again. ...
- Linux ssh登录命令
一.什么是SSH? 简单说,SSH是一种网络协议,用于计算机之间的加密登录. 如果一个用户从本地计算机,使用SSH协议登录另一台远程计算机,我们就可以认为,这种登录是安全的,即使被中途截获,密码也不会 ...
- denied 登陆后access_Linux SSH登陆出现Access Denied错误的解决方法
其实这个问题是从 SCP 过来的.用 SCP 在两台 Linux 服务器之间传送备份文件.输入完 root 密码后,总是出现 Permission denied, please try again. ...
- Linxu SSH登陆出现Access Denied错误的解决方法
其实这个问题是从 SCP 过来的.用 SCP 在两台 Linux 服务器之间传送备份文件.输入完 root 密码后,总是出现 Permission denied, please try again. ...
- linux ssh别的机器,Linux SSH 登录其他机器
ssh命令用于远程登录上Linux主机. 常用格式:ssh [-l login_name] [-p port] [user@]hostname 更详细的可以用ssh -h查看. 举例 不指定用户: s ...
最新文章
- RDKit | 从ChEMBL数据库提取大分子HELM单体(XML转换为DataFrame并搜索部分结构)
- Displaying Bitmaps Efficiently (一)-----Loading Large Bitmaps Efficiently(二)
- OpenCV:详解掩膜mask
- 分裂的奶牛群(洛谷P2907题题解,Java语言描述)
- Oracle 数据库监听配置
- 【待解决】使用JUnit时报错java.lang
- Koa 2 基础(仿知乎)
- vue - rimraf
- To程序员:要写出好代码,你需要懂点儿“底层思维”
- ubuntu下MySQL无法启动Couldn't find MySQL server (/usr/bin/mysqld_safe)”
- Java自动化测试——打开浏览器
- BZOJ1597 [Usaco2008 Mar]土地购买
- Android下WPS打开Excel2007版也有问题
- 协方差矩阵的定义性质与python实现
- UIPinchGestureRecognizer 放大、缩小手势
- 如何制作一个微信小程序【微信小程序是怎么做的】
- 《邱岳的产品实战》学习笔记:第9周
- 通达信 c java,通达信的c
- python pymysql cursors_怎么Pythonpymysql.cursors从mysql存储过程获取INOUT返回结果
- 【2309. 兼具大小写的最好英文字母】