1 <%# Copyright (C) The Arvados Authors. All rights reserved.
3 SPDX-License-Identifier: AGPL-3.0 %>
5 <div class="panel panel-default">
6 <div class="panel-heading">
7 <h4 class="panel-title">
8 <%= link_to virtual_machines_user_path(current_user) do %>
15 <div id="manage_virtual_machines" class="panel-body">
17 For more information see <%= link_to raw('Arvados Docs → User Guide → VM access'),
18 "#{Rails.configuration.Workbench.ArvadosDocsite}/user/getting_started/vm-login-with-webshell.html",
22 <% if !@my_virtual_machines.any? %>
23 <div id="no_shell_access" class="no_shell_access">
24 <div class="alert alert-warning clearfix">
26 You do not have access to any virtual machines. Some
27 Arvados features require using the command line. You may
28 request access to a hosted virtual machine with the command
31 <div class="pull-right">
33 action: 'request_shell_access',
39 class: 'btn btn-xs btn-primary',
41 disable_with: "Sending request...",
42 on_error_hide: '.no_shell_access .alert-success',
43 on_error_show: '.no_shell_access .alert-danger',
44 on_error_write: '.no_shell_access .alert-danger .error-text',
45 on_success_hide: '.no_shell_access .alert-danger',
47 Send request for shell access
51 <div class="alert alert-success" style="display:none">
52 <p class="contain-align-left"><%# (see javascripts/request_shell_access.js) %></p>
54 <div class="alert alert-danger" style="display:none">
55 <p class="contain-align-left">Sorry, something went wrong. Please try again. (<span class="error-text"></span>)</p>
59 <script> localStorage.removeItem('request_shell_access'); </script>
60 <table class="table virtual-machines-table">
62 <col style="width: 25%" />
63 <col style="width: 25%" />
64 <col style="width: 50%" />
70 <th> Command line </th>
71 <% if Rails.configuration.Services.WebShell.ExternalURL != URI("") %>
72 <th> Web shell <span class="label label-info">beta</span></th>
77 <% @my_virtual_machines.andand.each do |vm| %>
79 <td style="word-break:break-all;">
82 <td style="word-break:break-all;">
83 <%= @my_vm_logins[vm[:uuid]].andand.compact.andand.join(", ") %>
85 <td style="word-break:break-all;">
86 <% if @my_vm_logins[vm[:uuid]] %>
87 <% @my_vm_logins[vm[:uuid]].each do |login| %>
88 <code>ssh <%= login %>@<%= vm[:hostname] %>.<%= current_uuid_prefix || 'xyzzy' %></code>
92 <% if Rails.configuration.Services.WebShell.ExternalURL != URI("") %>
94 <% @my_vm_logins[vm[:uuid]].andand.each do |login| %>
95 <%= link_to webshell_virtual_machine_path(vm, login: login), title: "Open a terminal session in your browser", class: 'btn btn-xs btn-default', target: "_blank" do %>
96 Log in as <%= login %><br />
108 <p>In order to access virtual machines using SSH, <%= link_to ssh_keys_user_path(current_user) do%> add an SSH key to your account<%end%> and add a section like this to your SSH configuration file ( <i>~/.ssh/config</i>):</p>
109 <pre>Host *.<%= current_uuid_prefix || 'xyzzy' %>
111 ServerAliveInterval 60
112 ProxyCommand ssh -p2222 turnout@switchyard.<%= current_api_host || 'xyzzy.arvadosapi.com' %> -x -a $SSH_PROXY_FLAGS %h