---
# System prepended metadata

title: oracle服务器ssh打开密码登录

---

# oracle服务器ssh打开密码登录
#### tags: `ssh` `ubuntu` `linux` `oracle`

我在oracle的服务器上新建了一个账号`sudo adduser xxx`，同时赋予了sudo权限，`sudo usermod -aG sudo xxx`
但当我连接时报错如下。
```
ssh xxx@xxxxxxx
xxx@xxxxxxxxxx: Permission denied (publickey).
```
发现该ssh只支持publickkey登录。我需要密码登录。随后我修改了ssh的配置文件
`sudo nano /etc/ssh/sshd_config`
找到下面的内容，更改到和我一致
```
# To disable tunneled clear text passwords, change to no here!
PasswordAuthentication yes
#PermitEmptyPasswords no

# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
KbdInteractiveAuthentication yes

```
保存后`sudo service ssh restart`或`sudo service sshd restart`
可以密码登录了

完全免费社工库
下山虎社工库
https://t.me/MTTigerSGK
#社工库 #免费社工库