To access your Fossil repository, you will need to create an SSH Public/Private key and submit-cps506
the Public key.
- On Linux or Mac OS X
- From the command line, simply run:
ssh-keygen
Accept the default name/location and enter an empty passphrase (twice). - If you want to use the same key that you generated on Mac/Linux ssh-keygen with PuTTY on Windows, you will need to convert from Open SSH keys to PuTTY using puttygen. Helpful page here.
- From the command line, simply run:
- If you are on Windows 10, it is not quite as easy, but still not too bad.
- You need to verify you have installed OpenSSH
- If not, you need to install it as Administrator
- Then you run
ssh-keygen
the same as Linux and MacOSX above
On Linux and Mac OS X (and we believe Windows 10), fossil
can connect directly using ssh because all the ssh data is stored in a directory called .ssh
in the user's home directory.
- Now copy this to the moons:
scp .ssh/id_rsa.pub moon.cs.ryerson.ca:home.pub
(note, that if your account name on the moons is different than on your computer, you'll have to do:scp .ssh/id_rsa.pub yourID@moon.cs.ryerson.ca:home.pub
) - Log in to the moon,
ssh moon.cs.ryerson.ca
orssh yourID@moon.cs.ryerson.ca:home.pub
- Create a
.ssh
folder/directory if you don't have one:mkdir -p ~/.ssh;chmod 700 ~/.ssh
- Go to the .ssh directory
cd .ssh
- Append the file you created to the end of the authorized_keys file
cat ~/home.pub >>authorized_keys
(note the two > characters to append rather than overwrite) - (optionally,
ls
to see if you have any other.pub
files and do the above cat command for each of them (you may want to dossh-keygen
on the moon first in case you want to work on the moons rather than installing elixir and haskell on your home machine) you can append and re-submit later, if you prefer) submit-cps506 authorized_keys
- You're done! As a bonus, your ssh command to the moons from your home machine shouldn't require a password anymore.
-
Once I have processed your file, you should be able to do:
ssh cps506@cps506.cs.ryerson.ca ls
You should not be prompted for a password, and if your fossil has been created, it will be listed. If you are, it means that the public key that I have registered does not correspond to the private key that is in the.ssh
directory of your account on the current machine. This should work equally well on the moons and your home computer See the bottom of the page to verify the public key registered for your account.
Old Windows
- If you are on previous versions of Windows, it is not quite as easy, but still not too bad. Look at the latter part of this page.
- You will need to download PuTTY, which is an implementation of SSH. You will actually need PuTTYgen and Plink, but Pageant can be useful and you likely will find PuTTY itself useful to log in to computers remotely.
- Follow the instructions on PuTTYgen to generate a public/private key pair (this is a popular topic, so this page, this page, and this page are all about something completely different, but have reasonable instructions on generating SSH keys with puTTY). Regardless which instructions you use, use an empty passphrase unless you plan to use Pageant.
- You must save the public and private files. Call the private one
id_rsa.ppk
and the public oneid_rsa.pub
. Save them in your home directory (something likeC:\Users\dmason
). The names and location don't actually matter, but these names and locations are referenced in the rest of the instructions here. - You will have to add the directory containing
PLINK.EXE
(likelyC:Program Files\putty
) to yourPATH
. See the command line instructions. - Now email me the
id_rsa.pub
file from your home directory. - You're done!
On older Windows, there is no standard place for ssh files, and if you didn't set your path up right, fossil can't find the ssh program. After I've processed your public key, but before you try the fossil clone command do the following:
plink -i path\to\your\private\key.ppk -T cps506@cps506.sarg.ryerson.ca -P 22
using the path that worked above. If not, email the prof.
If everything is set up right, it will say it is connecting as cps506 and then do nothing. If you enter "hello" (or any gibberish) should give you a message and then a bunch of HTML (text with a lot of < and > characters), or it may not even let you type hello, in which case type Control-C to break out.
If it prompts you for a password, you didn't give the correct path to your .ppk
file; it must be a complete path starting with a device and top-level directory (like C:\
), and there cannot be any spaces in the path!
If you want to copy your key to the University computers (to use under Unix) you need to see this page or this page to export an OpenSSH key.
Put the files in your .ssh
directory and make sure that it has rw------- permissions (i.e. chmod 600 id_rsa
).