Installing and Setting Up SSH Server

To install SSH Server:

  1. Download SSH Server at www.openssh.org.
  2. Unzip setup.exe and run it.
  3. Accept all the default settings. This places all appropriate files in C:\Program Files\NetworkSimplicity.

To set up SSH Server:

  1. Open a command prompt by using Start -> Run -> cmd.
  2. Type the following to go to your install directory (by default, it is C:\Program Files\NetworkSimplicity):

    c:

    cd \program files\networksimplicity

  3. Go into the ssh subdirectory by typing:

    cd ssh

  4. Use mkpasswd to tune the passwd file. For example, to allow a local user localjoe to login, type the following:

    mkpasswd -l -u localjoe » ..\etc\passwd

    To allow a domain user “domainbob” to login, type:

    mkpasswd -d -u domainbob » ..\etc\passwd

    If you are on a domain controller, it is recommended to use the -d option, rather than the -l option. Though -l is a valid option on a domain controller for domain accounts you can end up having a spurious group ID associated with your username.

    Note

    If you want to use mkpasswd with a user that is not in your primary domain then you must use a different syntax. If you wanted to get user jdoe from trusted domain trustdomain you would type:

    mkpasswd -d -u jdoe trustdomain » ..\etc\passwd

    Do this for all users that should be able to login. You can copy these files to other OpenSSH on Windows installations as long as the users are identical.

  5. Use mkgroup to create a group file. Type the following for local groups:

    mkgroup -l » ..\etc\group

    For domain groups:

    mkgroup -d » ..\etc\group

    If you do both, open the file in notepad and remove any duplication.

  6. Reboot the server by typing:

    net stop opensshd

    net start opensshd

  7. Test the connection from another machine by typing:

    cmd ssh user@just_install_server

  8. Use a special key generator, for example PuTTygen, to generate public and private keys in OpenSSH format. They are used to provide authentication between the SSH Server and client. Note if you are using PuTTygen, you can either convert a generated private key into OpenSSH format (by selecting Conversions>Export OpenSSH key in the menu) or use the keys without conversion. dbForge Studio supports both formats.

    In the public key file copy the public key located between the following lines:

    BEGIN SSH2 PUBLIC KEY

    Comment: rsa-key-20090714

    this is the public key to copy

    END SSH2 PUBLIC KEY

  9. Create authorized_keys.pub file in C:\Program Files\NetworkSimplicity\ssh.ssh\ folder. This file will contain a public key used by the SSH Server to authenticate the client and give access to the MySQL Server. In the file type the following:

    ssh-rsa your public key user@user

  10. Open C:\Program Files\NetworkSimplicity\ssh\sshd_config file and specify the location of authorized_keys.pub file:

    AuthorizedKeysFile /ssh/.ssh/authorized_keys.pub

  11. If you want to use SSH connections with password authentication, check that your server supports this authentication. PasswordAuthentication line in sshd_config file should contain yes.
  12. Reboot the server by typing:

    net stop opensshd

    net start opensshd

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All Features

All features

Get acquainted with the rich features and capabilities of the Studio in less than 5 minutes.
Request a demo

Request a demo

If you consider employing the Studio for your business, request a demo to see it in action.
Ready to start using dbForge Studio for MySQL?