Press Windows key, search for 'Optional features'. Search for and install 'OpenSSH Server'
OpenSSH Server configuration for Windows Server and Windows
Key-based authentication in OpenSSH for Windows
Press Windows key, search for 'Optional features'. Search for and install 'OpenSSH Server'
OpenSSH Server configuration for Windows Server and Windows
Key-based authentication in OpenSSH for Windows
sshd: no hostkeys available -- exiting
https://www.garron.me/en/linux/sshd-no-hostkeys-available-exiting.html
I only needed to run
ssh-keygen -A
In the /etc/ssh/ folder, and the start the server
/etc/init.d/ssh start
What if ssh would not start?
This issue is caused by a bad configuration of /etc/ssh/sshd_config file. When the service try to launch it does not recognize every fields of this configuration file. In order to solve this issue, you must use the tool
/usr/sbin/sshd -T
In case /etc/ssh/sshd_config was wrong, this would show wrong parameters with lines.
You must correct this issues and then restart the service:
/etc/init.d/ssh restart
.ssh
subdirectory of your account home directory. You may need to enable showing hidden files to see the directory. If the directory does not exists, you need to create it first.authorized_keys
for editing. Again you may have to create this file, if this is your first key.Ctrl+C
).
Then, switch back to the editor and insert the data into the open file,
making sure it ends up all on one line. Save the file..ssh
directory and file authorized_keys
are not group-writable or world-writable. Recommended permissions for .ssh
directory are 700
. Recommended permissions for authorized_keys
files are 600
. Read more about changing permissions..ssh2
subdirectory of your account home directory.authorization
. In this file you should put a line like Key mykey.pub
, with mykey.pub
replaced by the name of your key file.Subsystem sftp internal-sftp # This section must be placed at the very end of sshd_config Match Group sftponly ChrootDirectory %h ForceCommand internal-sftp AllowTcpForwarding no
$ groupadd sftponly
$ usermod steve -g sftponly
$ usermod steve -s /bin/false
$ usermod steve -d /folder
$ service ssh restart
Write failed: Broken pipe Couldn't read packet: Connection reset by peer