<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.bathcs.com/index.php?action=history&amp;feed=atom&amp;title=SSH_keys</id>
	<title>SSH keys - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.bathcs.com/index.php?action=history&amp;feed=atom&amp;title=SSH_keys"/>
	<link rel="alternate" type="text/html" href="https://wiki.bathcs.com/index.php?title=SSH_keys&amp;action=history"/>
	<updated>2026-08-26T06:47:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.bathcs.com/index.php?title=SSH_keys&amp;diff=102&amp;oldid=prev</id>
		<title>Hw2210: Translate from boss.bathcs.com</title>
		<link rel="alternate" type="text/html" href="https://wiki.bathcs.com/index.php?title=SSH_keys&amp;diff=102&amp;oldid=prev"/>
		<updated>2026-06-04T06:50:41Z</updated>

		<summary type="html">&lt;p&gt;Translate from boss.bathcs.com&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;SSH keys are used for proving that you are who you say you are and are used instead of passwords for SSHing into different machines (and so also used pushing and pulling from repositories).&lt;br /&gt;
&lt;br /&gt;
These work by using a public and private key. You store the private key on your computer and sign messages with this (so basically encrypts it). Then another computer will use the public key to decrypt and so validate that you and only you could have encrypted the message.&lt;br /&gt;
&lt;br /&gt;
== Creating a Key ==&lt;br /&gt;
&lt;br /&gt;
[https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent GitHub also has great documentation on creating a key here]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Open a terminal ( [https://apps.microsoft.com/detail/9N0DX20HK701 Windows terminal], Powershell or &amp;lt;code&amp;gt;cmd&amp;lt;/code&amp;gt; on Windows)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Run &amp;lt;code&amp;gt;ssh-keygen -t ed25519 -b 4096&amp;lt;/code&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Note|text=&lt;br /&gt;
This creates a public and private key pair in your &amp;lt;code&amp;gt;.ssh&amp;lt;/code&amp;gt; folder using &amp;lt;code&amp;gt;ed25519&amp;lt;/code&amp;gt; encryption and 4096 bit long key. If you wish you can change the encryption type by replacing &amp;lt;code&amp;gt;ed25519&amp;lt;/code&amp;gt; with something else e.g. &amp;lt;code&amp;gt;rsa&amp;lt;/code&amp;gt; (which is for legacy systems)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Accept all the defaults&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;You may be asked for a password. It is good practice to set one. This encrypts the private key with this password and so you will have to type in the password when trying to SSH into another machine for the first time in your current session. (So remember it or write it in a password manager)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;p&amp;gt;This should save a private and public key in &amp;lt;code&amp;gt;.ssh&amp;lt;/code&amp;gt; in your home directory. Private key &amp;lt;code&amp;gt;~/.ssh/id_rsa&amp;lt;/code&amp;gt; and public key &amp;lt;code&amp;gt;~/.ssh/id_rsa.pub&amp;lt;/code&amp;gt;.&amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;On windows we recommend navigating to this directory and check “show hidden files” and “show file extensions” - look it up if its not obvious (which it is not). You should be able to tell the difference between &amp;lt;code&amp;gt;id_rsa&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;id_rsa.pub&amp;lt;/code&amp;gt;. Windows will think the &amp;lt;code&amp;gt;.pub&amp;lt;/code&amp;gt; is a publisher file (it is not) and so open it with notepad.&amp;lt;/p&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can then use this public key in locations such as “SSH keys” in GitLab and GitHub for security.&lt;/div&gt;</summary>
		<author><name>Hw2210</name></author>
	</entry>
</feed>