Merge branch '3193-manage-account' of git.curoverse.com:arvados into 3193-manage...
[arvados.git] / apps / workbench / app / views / users / _manage_virtual_machines.html.erb
index a3191c2085ef6f2c2ce1829c71c36da4b64a786f..8215f1f907d164e93d7227e6cdfecc4aecc6550a 100644 (file)
@@ -1,18 +1,21 @@
 <div>
   <p>
-    For more information see <%= link_to raw('Setting up SSH access'),
-    "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html", target: "_blank"%>.
+    For more information see <%= link_to raw('Arvados Docs &rarr; User Guide &rarr; SSH access'),
+  "#{Rails.configuration.arvados_docsite}/user/getting_started/ssh-access-unix.html",
+  target: "_blank"%>.  A sample <i>~/.ssh/config</i> entry is provided below.
   </p>
 
   <table class="table virtual-machines-table">
     <colgroup>
-      <col style="width: 50%" />
+      <col style="width: 25%" />
+      <col style="width: 25%" />
       <col style="width: 50%" />
     </colgroup>
     <thead>
       <tr>
         <th> Host name </th>
         <th> Login name </th>
+        <th> Command line </th>
       </tr>
     </thead>
     <tbody>
           <td style="word-break:break-all;">
             <%= @my_vm_logins[vm[:uuid]].andand.compact.andand.join(", ") %>
           </td>
+          <td style="word-break:break-all;">
+            <% if @my_vm_logins[vm[:uuid]] %>
+              <% @my_vm_logins[vm[:uuid]].each do |login| %>
+                <code>ssh&nbsp;<%= login %>@<%= vm[:hostname] %>.arvados</code>
+              <% end %>
+            <% end %>
+          </td>
         </tr>
       <% end %>
     </tbody>
   </table>
 
-  <%
-    login_name = @my_vm_logins[@my_vm_logins.andand.keys.first].andand.first
-    api_host = @my_virtual_machines.first.andand.hostname.andand.sub('.'+current_api_host,'')
-    if (login_name && api_host)
-  %>
-    <p>
-      To log in to <b><%=api_host%></b> using the login name <b><%=login_name%></b>, use <b><%=login_name%>@<%=api_host%>.arvados</b>.
-      Please see the <b>Setting up SSH access</b> section to the right for more detail.
-    </p>
-  <% end %>
+<p><i>~/.ssh/config:</i></p>
+<pre>Host *.arvados
+  ProxyCommand ssh -p2222 turnout@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h
+</pre>
 
 </div>