新しく作成されたアカウントでsuできますが、sshは直接機能しません。

新しく作成されたアカウントでsuできますが、sshは直接機能しません。

ここに指示が必要です。 Linuxサーバーで新しいアカウントを作成しましたが、奇妙な問題が発生しました。新しいアカウントはログインできず、test @ localhostでsshを実行することもできません。 rootや他のアカウントとしてsshを使用できます。別のアカウントでログインしたときにsu testを試みましたが、テストアカウントのパスワードを入力するように求められます。

[admin1@server]$ su test
Password: 
[test@server]$ exit
exit
[admin1@server]$ ssh test@localhost
test@localhost's password: 
Permission denied, please try again.

[admin1@server test]$ pwd
/home/test
[admin1@server test]$ sudo cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
[admin1@server test]$

[admin1@server log]$ sudo cat  messages | grep test
Apr  8 12:31:40 server su: (to test) admin1 on pts/0
Apr  8 12:31:40 server su: (to test) admin1 on pts/0
[admin1@server log]$
[admin1@server etc]$ sudo cat sshd_config 
[admin1@server etc]$ 

ところで、admin1@serverが動作しています。

ベストアンサー1

PermitRootLogin prohibit-passwordすでに有効になっている可能性が高いです/etc/ssh/sshd_config。そのシステムに切り替えるyesか(より良い場合)、RSAキーを使用してシステムにログインします。

おすすめ記事