не могу войти с моим паролем во время ssh-соединения
Мой
/etc/ssh/ssh_config
как следует
# This is the ssh client system-wide configuration file. See
# ssh_config(5) for more information. This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.
# Configuration data is parsed as follows:
# 1. command line options
# 2. user-specific file
# 3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.
# Site-wide defaults for some commonly used options. For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.
#Host *
# ForwardAgent no
# ForwardX11 no
# ForwardX11Trusted yes
PasswordAuthentication yes
# HostbasedAuthentication no
# GSSAPIAuthentication no
# GSSAPIDelegateCredentials no
# GSSAPIKeyExchange no
# GSSAPITrustDNS no
# BatchMode no
# CheckHostIP yes
# AddressFamily any
# ConnectTimeout 0
# StrictHostKeyChecking ask
# IdentityFile ~/.ssh/id_rsa
# IdentityFile ~/.ssh/id_dsa
# IdentityFile ~/.ssh/id_ecdsa
# IdentityFile ~/.ssh/id_ed25519
# Port 22
# Protocol 2
# Ciphers aes128-ctr,aes192-ctr,aes256-ctr,aes128-cbc,3des-cbc
# MACs hmac-md5,hmac-sha1,umac-64@openssh.com
# EscapeChar ~
# Tunnel no
# TunnelDevice any:any
# PermitLocalCommand no
# VisualHostKey no
# ProxyCommand ssh -q -W %h:%p gateway.example.com
# RekeyLimit 1G 1h
# SendEnv LANG LC_*
# HashKnownHosts yes
# GSSAPIAuthentication yes
мой
student
пользователь
ubuntu@ubuntu:~$ finger student
Login: student Name:
Directory: /home/student Shell: /bin/bash
Never logged in.
No mail.
No Plan.
при установлении SSH-соединения с моей виртуальной машиной мне следует ввести пароль, а это не тот случай, когда я получил это?
joseph@joseph-X541UJ:~$ multipass list
Name State IPv4 Image
ubuntu Running 10.226.208.153 Ubuntu 18.04 LTS
joseph@joseph-X541UJ:~$ ssh student@10.226.208.153
student@10.226.208.153: Permission denied (publickey).
почему я не могу войти в систему под его паролем, пожалуйста, помогите
1 ответ
Вам нужно установить это на стороне сервера. Если вы вообще не можете подключиться к серверу, чтобы внести эти изменения, возможно, вам не повезло делать это удаленно.
Однако сначала попробуйте принудительно выполнить аутентификацию по паролю:
ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no student@<ip-address>
После успешного подключения через SSH вы можете изменить настройки на стороне сервера.
Я предлагаю сначала сделать резервную копию конфигурации:
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults
Теперь отредактируйте файл конфигурации:
sudo nano /etc/ssh/sshd_config
Найдите строку, в которой говорится
PasswordAuthentication
и установите его на
yes
.
PasswordAuthenticationyes
Сохраните файл и перезапустите SSH
sudo systemctl restart ssh
См. Это руководство для получения дополнительной информации о настройке ssh.