Windows 10 Pro openssh server permission denied(publickey)?
Все ответы
I want to confirm with you if you followed the step-by-step documents and enable OPENSSH with default configuration:
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
What is your OpenSSH client and server OS version? if possible, please run Winver and provide me the detail OS build number.
Best Regards,
Eve Wang
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- Предложено в качестве ответа Eve Wang Microsoft contingent staff 8 июня 2020 г. 4:01
I am experiencing the same issue. I’m also using Windows 10 Pro.
This is definitely an issue related to the new May 2004 update (19041.264). My authentification setup was working perfectly fine prior to updating my system.
Password authentification is not affected by this issue. I’m using ed25519 key, I didn’t tested another format. I am not even prompted to enter my passphrase.
Looking at logs using verbose, I have this:
SSH Permission denied (publickey) [Решено]
Первое, что бросается в глаза: ssh слушает 22 порт, а подключиться пытаетесь через 2042
На сервере это порт 2042. Если я указываю неправильный порт, то выводится «ssh: connect to host xx.xx.xx.xx port 22: Connection timed out». То есть порт можно уточнять в команде ssh, что я и делаю. Значит ошибка не в этом.
3) скопировал публичный ключ id_dsa.pubв домашнюю директорию на удалённый сервер
Вероятно по этой причине не работает, так как по умолчанию ssh ищет ключи в файле
/.ssh/authorized_keys а не в домашней директории. По этому либо копируй ключ правильно на сервер командой
либо на сервере редактируй конфиг sshd_conf, опция AuthorizedKeysFile
Уточню, что скопировал я ключ туда, куда сказал администратор. в директорию
/.ssh/
Доступа к конфигу на удалённом сервере не имею.
Статью по ссылке я читал. Всё практически выполняю как там написано, но ошибка, вероятно, в каких-то особых конфигах скрыта.
При настройках по умолчанию у тебя на клиентской стороне ключи должный быть в папке
$HOME/.ssh/
что-то типа id_dsa, id_dsa.pub
На стороне сервера публичные ключи хранятся в файле
$HOME/.ssh/authorized_keys
Администратор мне сообщил, что публичный ключ id_dsa.pub нужно поместить в
/.ssh, что я и сделал.
У меня на компьютере я знаю где хранится приватный ключ, и я могу указать его расположение явно так: ssh -p 2042 [email protected] -i
/.ssh/id_dsa. Но это не помогает.
Кстати, не очень понятно, как можно использовать команду ssh-copy-id, которая работает при помощи ssh, если сам ssh я ещё не настроил?
Я так сделал и мне вывелось: /usr/bin/ssh-copy-id: ERROR: No identities found
Кстати, не очень понятно, как можно использовать команду ssh-copy-id, которая работает при помощи ssh, если сам ssh я ещё не настроил?
Имеется в виду, что есть доступ на сервер и до копирования ключей в ssh работает авторизация по паролю.
Можно попробовать на сервере из папки .ssh сделать
cat id_dsa.pub >> authorized_keys
это добавит ключ в конец файла authorized_keys
Файл «authorization» с текстом «key id_dsa.pub» я также создал, как и требовал администратор. Это было сделано с самого начала.
Ещё интересный момент. Администратор сервера предложить скачать и скомпилировать из исходных кодов свою особую программу и использовать её для создания файла ключей и подключения по ssh? o_O Что это может значить? Особый безопасный шел?
Проблема решена с помощью программы PuTTY и генерирования ключей с помощью команды puttygen. Может кому пригодится, что ключи в openssh и putty это не одно и тоже.
Забавно. Ответ из 2013 помог с Яндекс.Облако в 2020
Строка: ssh-copy-id -i
/.ssh/id_dsa.pub [email protected] просто спасла меня после недели мучений.
Вы всю ветку обсуждаете файл id_dsa.pub, хотя в статье о генерации ключей идет речь о файле id_rsa.pub. Даже там специально выделили жирным шрифтом.
Второе: в файле sshd_config парметр AuthorizedKeysFile надо раскомментить
/.ssh/id_dsa 0
У меня файл называется mySSH3 и он находится в домашнем каталоге. Почему-то при рестрате Ubuntu 18 про него забывает и приходится вновь будить ssh-agent и делать в домашнем каталоге где этот файл) ssh-add ./mySSH3
Openssh windows permission denied
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
Good day Community.
I try to setup ssh tunnel for TightVNC which will be used to secure remote desktop session between windows tablet and windows 10 PC.
ssh server OS: windows 10 pro ver 1909(2)
I installed openssh server via «add optional features.»
When I ssh in I from client with cmd command ssh admin1@ip server replies first with:
The authenticity of host (host’s IP)’ can’t be established.
ECDSA key fingerprint is SHA256:JqYEwLJJm/gR9by+aQhftpUsqbRnY06Cv/lRiC4syf4.
Are you sure you want to continue connecting (yes/no)? yes
but when I enter correct password, server replies with:
«permission denied, please try again» . » after 3 tries:(publickey,password,keyboard-interactive)»
I then created admin2 account on ssh server and tried ssh in again using admin2 credentials and I was able to dialin no problem.
How come I am able to access via admin2 and not admin1? Password is 100% correct.
The only thing is that I have Wonderware System Platform window viewer installed on this PC.
I tried to test openssh server on 2 different windows 10 machines and it was ok.
Windows 10 Pro openssh server permission denied(publickey)?
All replies
I want to confirm with you if you followed the step-by-step documents and enable OPENSSH with default configuration:
https://docs.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse
What is your OpenSSH client and server OS version? if possible, please run Winver and provide me the detail OS build number.
Best Regards,
Eve Wang
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
- Proposed as answer by Eve Wang Microsoft contingent staff Monday, June 8, 2020 4:01 AM
I am experiencing the same issue. I’m also using Windows 10 Pro.
This is definitely an issue related to the new May 2004 update (19041.264). My authentification setup was working perfectly fine prior to updating my system.
Password authentification is not affected by this issue. I’m using ed25519 key, I didn’t tested another format. I am not even prompted to enter my passphrase.
Looking at logs using verbose, I have this:
Openssh windows permission denied
Вопрос
Good day Community.
I try to setup ssh tunnel for TightVNC which will be used to secure remote desktop session between windows tablet and windows 10 PC.
ssh server OS: windows 10 pro ver 1909(2)
I installed openssh server via «add optional features.»
When I ssh in I from client with cmd command ssh admin1@ip server replies first with:
The authenticity of host (host’s IP)’ can’t be established.
ECDSA key fingerprint is SHA256:JqYEwLJJm/gR9by+aQhftpUsqbRnY06Cv/lRiC4syf4.
Are you sure you want to continue connecting (yes/no)? yes
but when I enter correct password, server replies with:
«permission denied, please try again» . » after 3 tries:(publickey,password,keyboard-interactive)»
I then created admin2 account on ssh server and tried ssh in again using admin2 credentials and I was able to dialin no problem.
How come I am able to access via admin2 and not admin1? Password is 100% correct.
The only thing is that I have Wonderware System Platform window viewer installed on this PC.
I tried to test openssh server on 2 different windows 10 machines and it was ok.