<p><var>You only need to do this if you need to do bulk updates of a lot of files to the server.</var><br> - Copying files <em>from</em> the server does not need this.<br>
- Only people updating or rearranging files on the server with a <ahref="bulkupdatelaptop.html">Bulk Update Laptop</a>, or programmers doing <ahref="../troggle/troglaptop.html">troggle software development</a> need this, e.g.
<p>You will need to run ssh-keygen/PuTTYgen on your device, email the public key to someone who already has ssh access (Wookey, Paul Fox, Philip Sargent). Once the key is installed by them you should be able to log in as 'expo' over ssh (and other software like git will also use this behind the scenes). This only needs doing once (for any machine you want access from).</p>
<p>A public key file looks like this: <code>ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEApc9+PAMrDtWa8D8/Z<em>..lots more like this..</em>qmkW/cQ== wookey@kh</code>i.e. a long string of characters with 'ssh-rsa' at the start and an ID at the end (often 'user'@'machine').</p>
<p>On Windows 10 or later openssh comes built-in. Open a command terminal and run <tt>ssh</tt> to see if you have it installed. If so just follow the linux instructions on this page - the process is identical. You can install it if it's not there. <ahref="https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_install_firstuse">(Microsoft setup instructions)</a>.
</p>
<p>Windows 9 has 'WSL' (Windows Subsystem for Linux) which is basically an Ubuntu install. That's the easiest way to use ssh. Run WSL and follow the linux instuctions here.
</p>
<p>For older Windows versions you need to use <ahref="https://www.ssh.com/ssh/putty/windows/puttygen">puttygen</a>, which is part of <ahref="https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html">PuTTY</a>. You need to install that if you don't already have it.</p>
<li>Save the private key (this will create a .ppk file that you will need later)</li>
<li>Don't save the public key - instead copy all of the text from the 'Public key for pasting
+into OPENSSH authorized_keys file' field, and paste that into the email. Make sure not to miss part or add newlines or otherwise mess with it.</li>
<li>Run Pageant (it will have been installed in your Start menu, otherwise find it it "C:\Program Files\PuTTY\pageant.exe"). Click the "Add Key" button. Select the .ppk file in the pop-up file list. You only need to do this once.
<li>That will create a file called (by default) <var>.ssh/id_rsa.pub</var> in your home directory. Email that file to one of the admins listed above. </li>
where <b>id_rsa_wsl</b> is the 'file in which to save the key' you specified above. (Other documentation may suggest that this file is called, e.g. 'anathema@mydevice'). But all the files int he .ssh folder must have secure access permissions, e.g. <var>chmod 600 ~/.ssh/*</var>
<li>Install the <ahref="https://play.google.com/store/apps/details?id=com.server.auditor.ssh.client&hl=en">Termius app</a>
which is a ssh client. The free version does ssh but not sFTP. Follow the <ahref="https://docs.termius.com/">Termius documentation</a> and in-app help to generate a key pair and then use the same process to upload the public key to the expo server as for Linux machines, i.e. email it to an admin.
<p>OK, you have an uploaded and usable key and you can ssh into the expo server. If you want to connect from another machine (e.g. your phone) it's better to make another key than try to re-use the first one. You don't need a nerd admin now, you can do this yourself. But be <b>extremely careful</b> to follow this exactly. If you innocently rename the files to something that appears more sensible it won't work.
<li>On your new machine, generate a key-pair. Since you are probably using a different operating system on your second machine, read the instructions above for the relevant OS. Yes you will be generating a new key. Do not re-use the key you had already.
<li>This time though, you will want to be sure that the key has a meaningful label. On Linux this means something like this:
(if your name is Anathema Device and your new machine is "pulsifer"). Just click through the questions it asks accepting the defaults. It will tell you what the key files are called and where it has put them.
<li>Now copy the public key file to your <em>first machine</em>, the one that is already set up with a working key-pair setup with the expo server. Using email to yourself is easiest.
<p>Note that by using sFTP like this we avoid having to use a text editor over ssh. If you know what you are doing you can do this of course, but the above process is less likely to cause problems for a Windows user setting up their phone as a second device where they are not experienced with vi or nano.
<li>Now your public key is installed for your second machine. This will enable ssh login instantly. You check that it works by logging into the expo server using ssh from your second machine: <var>ssh expo@expo.survex.com </var>.