пользователя и хочу заходить по ssh под новым пользователем?
AllowUsers - нужно добавить. Ну, или всех под PAM водить.
добавил AllowUsers username перезапустил сервис ssh - не помогло
Чему не помогло? У тебя проблема какая-то? Лог ssh -v в студию
UsePAM yes - стоит?
обычно ничего не нужно может там вход по паролю запрещён просто?
а я по ключам захожу
> ssh -p 22 user@MY_IP -i .\id_rsa -v OpenSSH_for_Windows_8.6p1, LibreSSL 3.4.3 debug1: Authenticator provider $SSH_SK_PROVIDER did not resolve; disabling debug1: Connecting to MY_IP [MY_IP] port 22. debug1: Connection established. debug1: identity file .\\id_rsa type 0 debug1: identity file .\\id_rsa-cert type -1 debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.6 debug1: Remote protocol version 2.0, remote software version OpenSSH_8.9p1 Ubuntu-3ubuntu0.4 debug1: compat_banner: match: OpenSSH_8.9p1 Ubuntu-3ubuntu0.4 pat OpenSSH* compat 0x04000000 debug1: Authenticating to MY_IP:22 as 'user' debug1: load_hostkeys: fopen C:\\Users\\er/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: algorithm: curve25519-sha256 debug1: kex: host key algorithm: ssh-ed25519 debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: kex: client->server cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none debug1: expecting SSH2_MSG_KEX_ECDH_REPLY debug1: SSH2_MSG_KEX_ECDH_REPLY received debug1: Server host key: ssh-ed25519 SHA256:95+ZvXa6C/MePTQPQqYBz/0FPe8pK4APJ6M7xu12CHU debug1: load_hostkeys: fopen C:\\Users\\er/.ssh/known_hosts2: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts: No such file or directory debug1: load_hostkeys: fopen __PROGRAMDATA__\\ssh/ssh_known_hosts2: No such file or directory debug1: Host '[MY_IP]:22' is known and matches the ED25519 host key. debug1: Found key in C:\\Users\\er/.ssh/known_hosts:20 debug1: rekey out after 134217728 blocks debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: rekey in after 134217728 blocks debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory debug1: Will attempt key: .\\id_rsa RSA SHA256:55TR/xaOlLP5+KPEIqQOBD3iLafLXDu70WLGnN5sc/4 explicit debug1: SSH2_MSG_EXT_INFO received debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,sk-ssh-ed25519@openssh.com,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,sk-ecdsa-sha2-nistp256@openssh.com,webauthn-sk-ecdsa-sha2-nistp256@openssh.com> debug1: kex_input_ext_info: publickey-hostbound@openssh.com (unrecognised) debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey debug1: Next authentication method: publickey debug1: Offering public key: .\\id_rsa RSA SHA256:55TR/xaOlLP5+KPEIqQOBD3iLafLXDu70WLGnN5sc/4 explicit debug1: Authentications that can continue: publickey debug1: No more authentication methods to try. user@MY_IP: Permission denied (publickey).
Права или путь к authorized_keys переписан
точно. спасибо. пофиксил.
Обсуждают сегодня