edgecase
When you believe a lie for too long, the truth doesn't set you free. It tears you apart.
~ Takeshi Kovacs
Author: StJohn Piano
Published: 2018-08-08
Datafeed Article 59
This article has been digitally signed by Edgecase Datafeed.
3001 words - 1402 lines - 36 pages






GOAL



Install OpenSSH on Cygwin, then use it to access a Virtual Private Server (VPS) running Linux.





CONTENTS



- Goal
- Contents
- Brief Summary
- Summary
- Notes
- Project Log





BRIEF SUMMARY



My system: Lenovo Thinkpad X200 running Windows 7 (64-bit). Cygwin is installed.

I installed the Cygwin package openssh 7.5p1-1. I created a new SSH key and gave it access to a VPS. I logged into the VPS via OpenSSH and executed some bash commands.

Note:
- None of the files mentioned in this project are stored as assets of this article.





SUMMARY



My system:
- Hardware = Lenovo Thinkpad X200 (Laptop). Two internal hard drives, each of 75 GB capacity.
- Processor = Intel(R) Core(TM)2 Duo CPU, P8600 @ 2.40GHz
- Memory (RAM) = 4.00 GB
- Operating System = Windows 7 Professional (Service Pack 1), 64-bit

I installed Cygwin during a previous project: Installing Cygwin on Windows 7

Using the Cygwin setup utility, I downloaded and installed openssh 7.5p1-1 from the Cygwin mirror
cygwin.mirror.constant.com
along with these dependencies that were automatically added:
- csih 0.9.11-1
- cygrunsrv 1.62-1
- libcom_err2 1.42.12-2
- libcrypt0 2.1-1
- libedit0 20130712-1
- libgssapi_krb5_2 1.15.2-2
- libk5crypto3 1.15.2-2
- libkrb5_3 1.15.2-2
- libkrb5support0 1.15.2-2
- libssp0 6.4.0-4

I ran the command
ssh-keygen
to generate an SSH RSA keypair.

I created a new droplet (VPS) on DigitalOcean and granted access to my new SSH public key.

I assigned a domain to this droplet. I then successfully logged in to the droplet via SSH using this command:
ssh root@edgecase-test.net


I executed some bash commands on the Linux VPS and then ran the command
exit
to log out.





NOTES



The Cygwin OpenSSH package may also depend on some of the packages that were already installed.

List of installed Cygwin packages at the end of this project:

Admin@Admin-PC ~

$ cygcheck --check-setup
Cygwin Package Information Package Version Status _autorebase 001007-1 OK alternatives 1.3.30c-10 OK base-cygwin 3.8-1 OK base-files 4.2-4 OK bash 4.4.12-3 OK bzip2 1.0.6-3 OK ca-certificates 2.22-1 OK coreutils 8.26-2 OK csih 0.9.11-1 OK cygrunsrv 1.62-1 OK cygutils 1.4.16-2 OK cygwin 2.10.0-1 OK dash 0.5.9.1-1 OK diffutils 3.5-2 OK editrights 1.03-1 OK file 5.32-1 OK findutils 4.6.0-1 OK gawk 4.2.1-1 OK getent 2.18.90-4 OK grep 3.0-2 OK groff 1.22.3-1 OK gzip 1.8-1 OK hostname 3.13-1 OK info 6.5-2 OK ipc-utils 1.0-2 OK less 530-1 OK libargp 20110921-3 OK libattr1 2.4.46-1 OK libblkid1 2.25.2-2 OK libbz2_1 1.0.6-3 OK libcom_err2 1.42.12-2 OK libcrypt0 2.1-1 OK libedit0 20130712-1 OK libffi6 3.2.1-2 OK libgcc1 7.3.0-3 OK libgdbm4 1.12-1 OK libgmp10 6.1.2-1 OK libgssapi_krb5_2 1.15.2-2 OK libiconv 1.14-3 OK libiconv2 1.14-3 OK libintl8 0.19.8.1-2 OK libk5crypto3 1.15.2-2 OK libkrb5_3 1.15.2-2 OK libkrb5support0 1.15.2-2 OK liblzma5 5.2.3-1 OK libmpfr6 4.0.1-4p11 OK libncursesw10 6.0-12.20171125 OK libopenssl100 1.0.2o-1 OK libp11-kit0 0.23.10-1 OK libpcre1 8.40-3 OK libpipeline1 1.4.0-1 OK libpopt-common 1.16-2 OK libpopt0 1.16-2 OK libreadline7 7.0.3-3 OK libsigsegv2 2.10-2 OK libsmartcols1 2.25.2-2 OK libssp0 6.4.0-4 OK libstdc++6 7.3.0-3 OK libtasn1_6 4.13-1 OK libuuid1 2.25.2-2 OK login 1.12-1 OK man-db 2.7.6.1-1 OK mintty 2.9.0-0 OK ncurses 6.0-12.20171125 OK openssh 7.5p1-1 OK openssl 1.0.2o-1 OK p11-kit 0.23.10-1 OK p11-kit-trust 0.23.10-1 OK rebase 4.4.4-1 OK run 1.3.4-2 OK sed 4.4-1 OK tar 1.29-1 OK terminfo 6.0-12.20171125 OK tzcode 2018e-1 OK tzdata 2018e-1 OK util-linux 2.25.2-2 OK vim-minimal 8.0.1567-1 OK which 2.20-2 OK xz 5.2.3-1 OK zlib0 1.2.11-1 OK











PROJECT LOG




My system:
- Hardware = Lenovo Thinkpad X200 (Laptop). Two internal hard drives, each of 75 GB capacity.
- Processor = Intel(R) Core(TM)2 Duo CPU, P8600 @ 2.40GHz
- Memory (RAM) = 4.00 GB
- Operating System = Windows 7 Professional (Service Pack 1), 64-bit



I installed Cygwin onto this system in a previous project: Installing Cygwin on Windows 7


During this previous project, I learned that an OpenSSH package exists for Cygwin, and that its maintainer is Corinna Vinschen.



Browse to:
www.cygwin.com


Click "Search Packages" in the navigation menu.
This leads to:
cygwin.com/cgi-bin2/package-grep.cgi

Radio button list (x86, x86_64) is set to x86_64.

Enter "openssh" in the search field and click Go.


Result: 34 packages, among which are:

openssh-debuginfo-7.5p1-1 - openssh-debuginfo: Debug info for openssh
openssh-debuginfo-7.6p1-1 - openssh-debuginfo: Debug info for openssh
openssh-debuginfo-7.7p1-1 - openssh-debuginfo: Debug info for openssh
openssh-7.5p1-1 - openssh: The OpenSSH server and client programs
openssh-7.5p1-1-src - openssh: The OpenSSH server and client programs (source code)
openssh-7.6p1-1 - openssh: The OpenSSH server and client programs
openssh-7.6p1-1-src - openssh: The OpenSSH server and client programs (source code)
openssh-7.7p1-1 - openssh: The OpenSSH server and client programs
openssh-7.7p1-1-src - openssh: The OpenSSH server and client programs (source code)


Each package name is a hyperlink.


I'll choose openssh-7.7p1-1.

Click its name.
It leads to:
cygwin.com/cgi-bin2/package-cat.cgi?file=x86_64%2Fopenssh%2Fopenssh-7.7p1-1&grep=openssh


Excerpt:

openssh: The OpenSSH server and client programs

2018-04-03 14:15 0 etc/ 2018-04-03 14:15 535929 etc/moduli 2018-04-03 14:15 0 etc/defaults/ 2018-04-03 14:15 0 etc/defaults/etc/ 2018-04-03 14:15 1495 etc/defaults/etc/ssh_config 2018-04-03 14:15 3117 etc/defaults/etc/sshd_config 2018-04-03 14:15 0 etc/defaults/etc/inetd.d/ 2018-04-03 14:15 192 etc/defaults/etc/inetd.d/sshd-inetd 2018-04-03 14:15 0 etc/postinstall/ 2018-04-03 14:15 56 etc/postinstall/openssh.sh 2018-04-03 14:15 0 usr/ 2018-04-03 14:15 0 usr/bin/ 2018-04-03 14:15 0 usr/bin/slogin -> ./ssh.exe 2018-04-03 14:15 22605 usr/bin/ssh-host-config 2018-04-03 14:15 8161 usr/bin/ssh-user-config 2018-04-03 14:15 10658 usr/bin/ssh-copy-id 2018-04-03 14:15 631827 usr/bin/ssh.exe 2018-04-03 14:15 82451 usr/bin/scp.exe 2018-04-03 14:15 298003 usr/bin/ssh-add.exe 2018-04-03 14:15 310803 usr/bin/ssh-agent.exe 2018-04-03 14:15 363027 usr/bin/ssh-keygen.exe 2018-04-03 14:15 365587 usr/bin/ssh-keyscan.exe 2018-04-03 14:15 131091 usr/bin/sftp.exe 2018-04-03 14:15 0 usr/sbin/ 2018-04-03 14:15 662035 usr/sbin/sshd.exe 2018-04-03 14:15 375827 usr/sbin/ssh-keysign.exe 2018-04-03 14:15 272915 usr/sbin/ssh-pkcs11-helper.exe 2018-04-03 14:15 89107 usr/sbin/sftp-server.exe 2018-04-03 14:15 0 usr/share/ 2018-04-03 14:15 0 usr/share/man/ 2018-04-03 14:15 0 usr/share/man/man1/ 2018-04-03 14:15 2253 usr/share/man/man1/scp.1.gz 2018-04-03 14:15 5442 usr/share/man/man1/sftp.1.gz 2018-04-03 14:15 2880 usr/share/man/man1/ssh-add.1.gz 2018-04-03 14:15 3201 usr/share/man/man1/ssh-agent.1.gz 2018-04-03 14:15 2970 usr/share/man/man1/ssh-copy-id.1.gz 2018-04-03 14:15 9240 usr/share/man/man1/ssh-keygen.1.gz 2018-04-03 14:15 1940 usr/share/man/man1/ssh-keyscan.1.gz 2018-04-03 14:15 14511 usr/share/man/man1/ssh.1.gz 2018-04-03 14:15 39 usr/share/man/man1/slogin.1.gz 2018-04-03 14:15 0 usr/share/man/man5/ 2018-04-03 14:15 1810 usr/share/man/man5/moduli.5.gz 2018-04-03 14:15 15238 usr/share/man/man5/ssh_config.5.gz 2018-04-03 14:15 13983 usr/share/man/man5/sshd_config.5.gz 2018-04-03 14:15 0 usr/share/man/man8/ 2018-04-03 14:15 2416 usr/share/man/man8/sftp-server.8.gz 2018-04-03 14:15 1452 usr/share/man/man8/ssh-keysign.8.gz 2018-04-03 14:15 830 usr/share/man/man8/ssh-pkcs11-helper.8.gz 2018-04-03 14:15 10911 usr/share/man/man8/sshd.8.gz 2018-04-03 14:15 0 usr/share/doc/ 2018-04-03 14:15 0 usr/share/doc/openssh/ 2018-04-03 14:15 5493 usr/share/doc/openssh/CREDITS 2018-04-03 14:15 303964 usr/share/doc/openssh/ChangeLog 2018-04-03 14:15 15190 usr/share/doc/openssh/LICENCE 2018-04-03 14:15 6705 usr/share/doc/openssh/OVERVIEW 2018-04-03 14:15 16963 usr/share/doc/openssh/PROTOCOL 2018-04-03 14:15 220 usr/share/doc/openssh/PROTOCOL.agent 2018-04-03 14:15 11675 usr/share/doc/openssh/PROTOCOL.certkeys 2018-04-03 14:15 6262 usr/share/doc/openssh/PROTOCOL.mux 2018-04-03 14:15 2642 usr/share/doc/openssh/README 2018-04-03 14:15 1607 usr/share/doc/openssh/README.dns 2018-04-03 14:15 4047 usr/share/doc/openssh/README.platform 2018-04-03 14:15 2307 usr/share/doc/openssh/README.privsep 2018-04-03 14:15 4890 usr/share/doc/openssh/README.tun 2018-04-03 14:15 2606 usr/share/doc/openssh/TODO 2018-04-03 14:15 0 usr/share/doc/Cygwin/ 2018-04-03 14:15 3080 usr/share/doc/Cygwin/openssh.README 2018-04-03 14:15 0 usr/lib/




Excerpt from the previous project:

Create a new directory on the system [location not specified]. Name it "cygwin_manager". Move "setup-x86_64.exe" into this directory. Create a new directory within "cygwin_manager" named "cygwin_packages". Move the directory
"http%3a%2f%2fcygwin.mirror.constant.com%2f"
into "cygwin_packages".

When using Cygwin again on this system, I plan to:
- run setup-x86_64.exe from this particular location
- use "cygwin_packages" as a general package archive
- use per-mirror directories in "cygwin_packages" as per-mirror package archives

Note: I will need to change the directory paths when I next run setup-x86_64.exe.




setup-x86_64.exe is used for installing or updating packages as well for performing the initial installation of Cygwin.

Double-click setup-x86_64.exe.


New dialog box:

[Title] Open File - Security Warning

The publisher could not be verified. Are you sure you want to run this software?

Name: [path-to-cygwin-manager-directory]\setup-x86_64.exe
Publisher: Unknown Publisher
Type: Application
From: [path-to-cygwin-manager-directory? it's cut off at the end]

[Buttons] Run, Cancel

[Ticked box] Always ask before opening this file

This file does not have a valid digital signature that verifies its publisher. You should only run software from publishers you trust.
[Link] How can I decide what software to run?



Click Run.


New dialog box:

[Title] User Account Control

Do you want to allow the following program from an unknown publisher to make changes to this computer?

Program name: setup-x86_64.exe
Publisher: Unknown
File origin: Downloaded from the Internet

[Button] Show details

[Buttons] Yes, No

[Link] Change when these notifications appear



Click Yes.


New dialog box:

[Title] Cygwin Setup

Cygwin Net Release Setup Program

This setup program is used for the initial installation of the Cygwin environment as well as all subsequent updates. Make sure to remember where you saved it.

The pages that follow will guide you through the installation. Please note that Cygwin consists of a large number of packages spanning a wide variety of purposes. We only install a base set of packages by default. You can always run this program at any time in the future to add, remove, or upgrade packages as necessary.

Setup version 2.893 (64 bit)
Copyright 2000-2018
https://cygwin.com/

[Buttons] Back [greyed out], Next, Cancel




Click Next.


Dialog box:

[Title] Cygwin Setup - Choose Installation Type

Choose a Download Source
Choose whether to install or download from the internet, or install from files in a local directory.

[Radio buttons]
- [Selected button] Install from Internet (downloaded files will be kept for future re-use)
- Download Without Installing
- Install from Local Directory

[Buttons] Back, Next, Cancel



Click Next.



Dialog box:

[Title] Cygwin Setup - Choose Installation Directory

Select Root Install Directory
Select the directory where you want to install Cygwin. Also choose a few installation parameters.

Root directory:
- [Field] C:\cygwin64
- [Button] Browse

Install for
[Radio buttons]
- [Selected option] All users (RECOMMENDED). Cygwin will be available to all users of the system.
- Just Me. Cygwin will still be available to all users, but Desktop Icons, Cygwin Menu Entries, and important Installer information are only available to the current user. Only select this if you lack Administrator privileges or if you have specific needs.

[Buttons] Back, Next, Cancel




Click Next.


Dialog box:

[Title] Cygwin Setup - Choose Local Package Directory

Select Local Package Directory
Select a directory where you want Setup to store the installation files it downloads. The directory will be created if it does not already exist.

Local Package Directory
- [Field] [path-to-previous-project-directory]\work
- [Button] Browse

[Buttons] Back, Next, Cancel



Click Browse and change the Field value from
[path-to-previous-project-directory]\work

to
[path-to-cygwin-manager-directory]\cygwin_packages
.



Click Next.



Dialog box:

[Title] Cygwin Setup - Select Connection Type

Select Your Internet Connection
Setup needs to know how you want it to connect to the internet. Choose the appropriate settings below.

[Radio buttons]
- [Selected option] Use System Proxy Settings
- Direct Connection
- Use HTTP/FTP Proxy
-- Proxy Host: [Field] [greyed out]
-- Port: [Field] [greyed out] 80

[Buttons] Back, Next, Cancel



Click Next.


The dialog box briefly displays information about downloading the mirrors list from https://cygwin.com. I used a smartphone to video this and read it afterwards.


Dialog box:

[Title] Cygwin Setup - Choose Download Site(s)

Choose a Download Site
Choose a site from this list, or add your own sites to the list

Available Download Sites:
- [Field list]
http://cygwin.mirror.constant.com
http://cygwin.mirrors.hoobly.com
http://mirrors.koehn.com
http://mirrors.metapeer.com
http://www.pirbot.com
https://www.singleboersen.com
http://mirror.team-cymru.com
ftp://mirrors.xmission.com
http://mirrors.xmission.com
http://mirror.clarkson.edu
http://mirror.rit.edu
http://mirror.cs.vt.edu
http://mirror.koddos.net
[further output omitted]

User URL: [Field]
[Button] Add

[Buttons] Back, Next, Cancel



Click (and thereby select)
cygwin.mirror.constant.com

Click Next.



[Dialog box displays progress of download process]



Dialog box (larger this time):

[Title] Cygwin Setup - Select Packages

[Package viewer interface]

View: [Drop-down list] Pending

Search: [Field]
[Button] Clear

Nothing to Install/Update

[Buttons] Back, Next, Cancel



Note: I haven't included the entire interface (e.g. all the buttons) in the dialog box rendition above.


In the Search field, enter "openssh" and press Enter.

Nothing is displayed.

Change the value of the View drop-down list from Pending to Full.

4 results, among which is:
- openssh: The OpenSSH server and client programs

The Search field seems to act as a filter that acts in concert with the other settings, rather than as an independent element.

Its category is "Net" (presumably the Net release) and its size is 750k (presumably bytes).

Under the "New" column, click "Skip", which then changes to "7.5p1-1".
- Clicking this value again returns to Skip. Evidently this mirror only stores the package for the 7.5p1-1 version of OpenSSH. Click Skip again to set the value to 7.5p1-1.


Click Next.




Dialog box:

[Title] Cygwin Setup - Review and confirm changes

Review and confirm changes

[Text box]
Install csih 0.9.11-1 (automatically added)
Install cygrunsrv 1.62-1 (automatically added)
Install libcom_err2 1.42.12-2 (automatically added)
Install libcrypt0 2.1-1 (automatically added)
Install libedit0 20130712-1 (automatically added)
Install libgssapi_krb5_2 1.15.2-2 (automatically added)
Install libk5crypto3 1.15.2-2 (automatically added)
Install libkrb5_3 1.15.2-2 (automatically added)
Install libkrb5support0 1.15.2-2 (automatically added)
Install libssp0 6.4.0-4 (automatically added)
Install openssh 7.5p1-1


[Buttons] Back, Next, Cancel



Ok. So the Cygwin OpenSSH package presumably contains a list of its dependencies, which the mirror was able to extract, store, and provide to my Cygwin client, allowing my client to display their names.


Click Next.



[Dialog box displays progress of installation process]


Dialog box:

[Title] Cygwin Setup - Installation Status and Create Icons

Create Icons
Tell setup if you want it to create a few icons for convenient access to the Cygwin environment.

[Unticked box] Create icon on Desktop
[Unticked box] Add icon to Start Menu

Installation Status:
Installation Complete

[Buttons] Back, Finish, Cancel



Click Finish.


Dialog box closes.


Start Cygwin terminal.


Admin@Admin-PC ~

$ cygcheck --check-setup
Cygwin Package Information Package Version Status _autorebase 001007-1 OK alternatives 1.3.30c-10 OK base-cygwin 3.8-1 OK base-files 4.2-4 OK bash 4.4.12-3 OK bzip2 1.0.6-3 OK ca-certificates 2.22-1 OK coreutils 8.26-2 OK csih 0.9.11-1 OK cygrunsrv 1.62-1 OK cygutils 1.4.16-2 OK cygwin 2.10.0-1 OK dash 0.5.9.1-1 OK diffutils 3.5-2 OK editrights 1.03-1 OK file 5.32-1 OK findutils 4.6.0-1 OK gawk 4.2.1-1 OK getent 2.18.90-4 OK grep 3.0-2 OK groff 1.22.3-1 OK gzip 1.8-1 OK hostname 3.13-1 OK info 6.5-2 OK ipc-utils 1.0-2 OK less 530-1 OK libargp 20110921-3 OK libattr1 2.4.46-1 OK libblkid1 2.25.2-2 OK libbz2_1 1.0.6-3 OK libcom_err2 1.42.12-2 OK libcrypt0 2.1-1 OK libedit0 20130712-1 OK libffi6 3.2.1-2 OK libgcc1 7.3.0-3 OK libgdbm4 1.12-1 OK libgmp10 6.1.2-1 OK libgssapi_krb5_2 1.15.2-2 OK libiconv 1.14-3 OK libiconv2 1.14-3 OK libintl8 0.19.8.1-2 OK libk5crypto3 1.15.2-2 OK libkrb5_3 1.15.2-2 OK libkrb5support0 1.15.2-2 OK liblzma5 5.2.3-1 OK libmpfr6 4.0.1-4p11 OK libncursesw10 6.0-12.20171125 OK libopenssl100 1.0.2o-1 OK libp11-kit0 0.23.10-1 OK libpcre1 8.40-3 OK libpipeline1 1.4.0-1 OK libpopt-common 1.16-2 OK libpopt0 1.16-2 OK libreadline7 7.0.3-3 OK libsigsegv2 2.10-2 OK libsmartcols1 2.25.2-2 OK libssp0 6.4.0-4 OK libstdc++6 7.3.0-3 OK libtasn1_6 4.13-1 OK libuuid1 2.25.2-2 OK login 1.12-1 OK man-db 2.7.6.1-1 OK mintty 2.9.0-0 OK ncurses 6.0-12.20171125 OK openssh 7.5p1-1 OK openssl 1.0.2o-1 OK p11-kit 0.23.10-1 OK p11-kit-trust 0.23.10-1 OK rebase 4.4.4-1 OK run 1.3.4-2 OK sed 4.4-1 OK tar 1.29-1 OK terminfo 6.0-12.20171125 OK tzcode 2018e-1 OK tzdata 2018e-1 OK util-linux 2.25.2-2 OK vim-minimal 8.0.1567-1 OK which 2.20-2 OK xz 5.2.3-1 OK zlib0 1.2.11-1 OK




Looks like openssh 7.5p1-1 and all its listed dependencies have been installed.




Admin@Admin-PC ~

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/Admin/.ssh/id_rsa):
Created directory '/home/Admin/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/Admin/.ssh/id_rsa.
Your public key has been saved in /home/Admin/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:OOknyEOgEb72nMMYNFqJWeQb22Hb9eJL/o16hBJGO0o Admin@Admin-PC
The key's randomart image is:
+---[RSA 2048]----+ |..o | |.* . . | |++* o. .. | |o+oBE+=+ . | |o+o.+o=oS.. | |. *ooo.o... | | . *+ o.+. | | .. = ..o | | ++o . | +----[SHA256]-----+


Admin@Admin-PC ~

$ cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI5ceO+ft1ruLBmGPlCpnSOb8/JJ53X9UamFvYpyNjmoeDrGIj97ND9YUIxBNVlNGh7x+rLqiGTdXz7zUuqr/gZBhksGi51ZFEhBtrfRMw/uUeIFJnqzUPntgRrndR/Yxm4DMtdmDOKrbzOw7zapN0gpRcqrlK2aaLFyMS0nJNubPi7XP4XlJnnyuAk/MJpo9cSiTWROvps+boNlOynmNIS0nX7Y9O67xzUj0evUqM8zp+JSMZ073NFeHE7C2amFSzFBk/OCslYN+iKFuv9ft41pAs/WXJdynUkhX44ygD4XqHGEwZj6cAKqOppsI8W5VI7rQTfA3/KmWN+fk85kql Admin@Admin-PC



Note: I didn't use a passphrase.




I already have a DigitalOcean account.

Log in to DigitalOcean.

I'll create a droplet (DigitalOcean's term for a VPS).

Click Create. Choose Droplets.


I now see the "Create Droplets" interface.

Choose these droplet details:
- Distribution = CentOS 6.9 x64
- Memory = 1 GB
- vCPUS = 1 vCPU
- SSD Disk = 25 GB
- Transfer = 1 TB
- Price = $5/mo, $0.007/hr
- Datacentre region = London

In the section "Add your SSH keys", click "New SSH Key". New interface opens. A text box is present with message "SSH key content". Paste in the SSH public key created earlier.

id_rsa.pub:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDI5ceO+ft1ruLBmGPlCpnSOb8/JJ53X9UamFvYpyNjmoeDrGIj97ND9YUIxBNVlNGh7x+rLqiGTdXz7zUuqr/gZBhksGi51ZFEhBtrfRMw/uUeIFJnqzUPntgRrndR/Yxm4DMtdmDOKrbzOw7zapN0gpRcqrlK2aaLFyMS0nJNubPi7XP4XlJnnyuAk/MJpo9cSiTWROvps+boNlOynmNIS0nX7Y9O67xzUj0evUqM8zp+JSMZ073NFeHE7C2amFSzFBk/OCslYN+iKFuv9ft41pAs/WXJdynUkhX44ygD4XqHGEwZj6cAKqOppsI8W5VI7rQTfA3/KmWN+fk85kql Admin@Admin-PC


Set Name to "SP_THINKPAD_1".

[SP = "StJohn Piano"]

Click "Add SSH Key".

SP_THINKPAD_1 now appears in the list of keys. The box next to it is ticked.

Set hostname to "spt1".

Click Create.


I now see the Project interface. New droplet is being created.

New droplet finished. It has the IP address 178.62.36.113.


I have a spare domain: edgecase-test.net

Click it. The "Create new record" interface opens.

Excerpt:
Use @ to create the record at the root of the domain or enter a hostname to create it elsewhere. A records are for IPv4 addresses only and tell a request where your domain should direct to.



It already has 3 Nameserver records pointing to the DigitalOcean nameservers.

Create an A record for this domain. Use "@" for hostname. Set "Will direct to" to the droplet spt1. Set "TTL (Seconds)" to 3600.

Click Create Record.


3600 seconds = 1 hour.



[Approximately 10 minutes pass]



Admin@Admin-PC ~

$ ping edgecase-test.net

Pinging edgecase-test.net [178.62.36.113] with 32 bytes of data:
Reply from 178.62.36.113: bytes=32 time=22ms TTL=52
Reply from 178.62.36.113: bytes=32 time=23ms TTL=52



I pressed control-C to stop the ping command.

I think the DNS update took relatively little time because the domain was already pointed to the DigitalOcean nameservers.



Admin@Admin-PC ~

$ ssh root@edgecase-test.net
The authenticity of host 'edgecase-test.net (178.62.36.113)' can't be established.
RSA key fingerprint is SHA256:Z/RBRHUQqO8hXS/BC3q0JxqgI8TmMblftlaw0T74/zE.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'edgecase-test.net,178.62.36.113' (RSA) to the list of known hosts.

[root@spt1 ~]# ls


[root@spt1 ~]# ls -a1

.
..
.bash_history
.bash_logout
.bash_profile
.bashrc
.cloud-locale-test.skip
.ssh

[root@spt1 ~]# pwd

/root

[root@spt1 ~]# ping -c 1 google.com

PING google.com (216.58.210.46) 56(84) bytes of data.
64 bytes from lhr25s11-in-f14.1e100.net (216.58.210.46): icmp_seq=1 ttl=58 time=1.23 ms

--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 1ms
rtt min/avg/max/mdev = 1.230/1.230/1.230/0.000 ms

[root@spt1 ~]# grep Password /etc/ssh/sshd_config

#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication no
# PasswordAuthentication. Depending on your PAM configuration,
# PAM authentication, then enable this but set PasswordAuthentication

[root@spt1 ~]# exit

logout
Connection to edgecase-test.net closed.




It looks like PasswordAuthentication = "no" by default, which is good.




So: I have successfully logged in to a Linux VPS using OpenSSH + Cygwin + Windows.


Excellent. That's the end of this project.









[start of notes]


- I have not always preserved the format of any excerpts from webpages on other sites (e.g. not preserving the original bold/italic styles, changing the list structures, not preserving hyperlinks).
- I have not always preserved the format of any computer output (e.g. from running bash commands). Examples: Setting input lines in bold text, adding/removing newlines in order to make a sequence of commands easier to read, using hyphens for lists and sublists instead of indentation, breaking wide tables into consecutive sections.
- I have not always preserved the format of any information copied from dialog boxes.

[end of notes]