© 2022 - aleteo.co
This topic covers the Windows-specific configuration for OpenSSH Server (sshd).
OpenSSH maintains detailed documentation for configuration options online at OpenSSH.com, which is not duplicated in this documentation set.
The default command shell provides the experience a user sees when connecting to the server using SSH.The initial default Windows is the Windows Command shell (cmd.exe).Windows also includes PowerShell and Bash, and third party command shells are also available for Windows and may be configured as the default shell for a server.
To set the default command shell, first confirm that the OpenSSH installation folder is on the system path.For Windows, the default installation folder is SystemDrive:WindowsDirectorySystem32openssh.The following commands shows the current path setting, and add the default OpenSSH installation folder to it.
|Command shell||Command to use|
Configuring the default ssh shell is done in the Windows registry by adding the full path to the shell executable to ComputerHKEY_LOCAL_MACHINESOFTWAREOpenSSH in the string value DefaultShell.
As an example, the following Powershell command sets the default shell to be PowerShell.exe:
In Windows, sshd reads configuration data from %programdata%sshsshd_config by default, or a different configuration file may be specified by launching sshd.exe with the -f parameter.If the file is absent, sshd generates one with the default configuration when the service is started.
SSHACCESS.COM - List SSH Server List All Server with Status Information ease to observe all server status on our site. Users more easily choose the account that is still available and the server is online. Primarily used on Linux and Unix based systems to access shell accounts, SSH was designed as a replacement for Telnet and other insecure remote shells, which send information, notably passwords, in plaintext that make it easy to be caught up. MobaSSH SSH server for Windows. MobaSSH allows you to run commands and transfer files on a remote Windows PC from any operating system (GNU/Linux, Unix, HP-UX, AIX, Windows.) through a fully secured and encrypted network connection. Read more about SSH protocol. Based on OpenSSH, MobaSSH is 100% compatible with the Linux/Unix/HPUx/AIX SSH clients, but also with MobaXterm, Putty or WinSCP on Windows.
The elements listed below provide Windows-specific configuration possible through entries in sshd_config.There are other configuration settings possible in that are not listed here, as they are covered in detail in the online Win32 OpenSSH documentation.
Controlling which users and groups can connect to the server is done using the AllowGroups, AllowUsers, DenyGroups and DenyUsers directives.The allow/deny directives are processed in the following order: DenyUsers, AllowUsers, DenyGroups, and finally AllowGroups.All account names must be specified in lower case.See PATTERNS in ssh_config for more information on patterns for wildcards.
When configuring user/group based rules with a domain user or group, use the following format:
user?domain*.Windows allows multiple of formats for specifying domain principals, but many conflict with standard Linux patterns.For that reason, * is added to cover FQDNs.Also, this approach uses '?', instead of @, to avoid conflicts with the [email protected] format.
Work group users/groups and internet-connected accounts are always resolved to their local account name (no domain part, similar to standard Unix names).Domain users and groups are strictly resolved to NameSamCompatible format - domain_short_nameuser_name.All user/group based configuration rules need to adhere to this format.
Examples for domain users and groups
Examples for local users and groups
For Windows OpenSSH, the only available authentication methods are 'password' and 'publickey'.
The default is '.ssh/authorized_keys .ssh/authorized_keys2'. If the path is not absolute, it is taken relative to user's home directory (or profile image path). Ex. c:usersuser. Note that if the user belongs to the administrator group, %programdata%/ssh/administrators_authorized_keys is used instead.
This directive is only supported with sftp sessions. A remote session into cmd.exe wouldn't honor this. To setup a sftp-only chroot server, set ForceCommand to internal-sftp. You may also set up scp with chroot, by implementing a custom shell that would only allow scp and sftp.
The defaults are %programdata%/ssh/ssh_host_ecdsa_key, %programdata%/ssh/ssh_host_ed25519_key, %programdata%/ssh/ssh_host_dsa_key, and %programdata%/ssh/ssh_host_rsa_key. If the defaults are not present, sshd automatically generates these on a service start.
Note that pattern rules in this section. User and group names should be in lower case.
Not applicable in Windows. To prevent administrator login, use Administrators with DenyGroups directive.
If you need file based logging, use LOCAL0. Logs are generated under %programdata%sshlogs.For any other value, including the default value, AUTH directs logging to ETW. For more info, see Logging Facilities in Windows.
The following configuration options are not available in the OpenSSH version that ships in Windows Server 2019 and Windows 10 1809:
Do you want to quickly test your SFTP client and don't have your own SFTP server? Try one of these publicly accessible SFTP servers.
Most of them only allow read-only access. If you need to upload data as well, choose an SFTP server and download/install if yourself. For quick tests, consider using a ligheweight and easy-to-launch server such as Rebex Tiny SFTP server or Core SFTP mini server.
|web||check||test.rebex.net:22||demo/password||Also supports SSH, FTP/SSL, FTP, IMAP, POP3 and Time protocols. Read-only.|
|web||check||itcsubmit.wustl.edu:22||-||Only for connection test. No public username/password available.|
|web||n/a||demo.wftpserver.com:2222||demo-user/demo-user||Also supports FTP/SSL and FTP.|