use the same API host for all examples
[arvados.git] / doc / user / ssh-access.md
1 ---
2 layout: default
3 navsection: userguide
4 title: Setting up SSH access
5 navorder: 2
6 ---
7
8 # Setting up SSH access
9
10 Arvados uses SSH public key authentication for two things:
11
12 * logging in to a VM, and
13 * pushing code to a git repository.
14
15 ### Generate a public/private SSH key pair
16
17 If you don't already have an SSH key pair (or you don't know whether
18 you do), there are lots of tutorials out there to help you get
19 started:
20
21 * [github SSH key
22 tutorial](https://www.google.com/search?q=github+ssh+key+help)
23
24 ### Associate your SSH public key with your Arvados Workbench account
25
26 Go to the `Keys` page in Arvados Workbench (under the `Access` tab) and click the
27
28 <p style="margin-left: 4em"><span class="btn btn-primary">Add a new authorized key</span></p>
29
30 button. Then click on 'none' in the public_key column, and copy and paste your public key:
31
32 ![Screen shot of the ssh public key box]({{ site.baseurl }}/images/ssh-adding-public-key.png)
33
34 Click on the checkmark button to save your public key.
35
36 ### Unix-like systems: set up an ~/.ssh/config snippet for quick ssh access
37
38 **Please make sure to replace {{ site.arvados_api_host }} with your arvados hostname in the examples below.**
39
40 On your workstation, add the following section to your `~/.ssh/config`
41 file:
42
43     Host *.arvados
44       ProxyCommand ssh -p2222 turnout@switchyard.{{ site.arvados_api_host }} -x -a $SSH_PROXY_FLAGS %h
45
46 If you have access to an account `foo` on a VM called `blurfl` then
47 you can log in like this:
48
49     ssh foo@blurfl.arvados
50
51 If you want to shorten this and you always/usually have access to the
52 `foo` account on VMs, you can add a section like this to
53 `~/.ssh/config`:
54
55     Host *.a
56       ProxyCommand ssh -p2222 turnout@switchyard.{{ site.arvados_api_host }} -x -a $SSH_PROXY_FLAGS %h
57       User foo
58
59 Then you can log in to the `blurfl` VM as `foo` like this:
60
61     ssh blurfl.a
62
63 (Arvados Workbench will show you a list of VMs you have access to and
64 what your account name is for each one.)
65
66 ### Windows: Setup instructions for PuTTY
67
68 {% include alert-stub.html %}
69
70 If you use Microsoft Windows, you should download the PuTTY software.
71
72 * Details about configuring PuTTY would be nice here.