20259: Add documentation for banner and tooltip features
[arvados.git] / doc / user / debugging / container-shell-access.html.textile.liquid
1 ---
2 layout: default
3 navsection: userguide
4 title: Debugging workflows - shell access
5 ...
6 {% comment %}
7 Copyright (C) The Arvados Authors. All rights reserved.
8
9 SPDX-License-Identifier: CC-BY-SA-3.0
10 {% endcomment %}
11
12 {% include 'notebox_begin' %}
13
14 To use this feature, your Arvados installation must be configured to allow container shell access. See "the install guide":{{site.baseurl}}/install/container-shell-access.html for more information.
15
16 {% include 'notebox_end' %}
17
18 The @arvados-client@ program can be used to connect to a container in a running workflow. It can be installed from packages (@apt install arvados-client@ or @yum install arvados-client@). The @arvados-client shell@ command provides an ssh connection into a running container.
19
20 h2(#syntax). Syntax
21
22 The @arvados-client shell@ tool has the following syntax:
23
24 <notextile>
25 <pre><code>~$ <span class="userinput">arvados-client shell -h</span>
26 arvados-client shell: open an interactive shell on a running container.
27
28 Usage: arvados-client shell [options] [username@]container-uuid [ssh-options] [remote-command [args...]]
29
30 Options:
31   -detach-keys string
32       set detach key sequence, as in docker-attach(1) (default "ctrl-],ctrl-]")
33
34 </code></pre>
35 </notextile>
36
37 The @arvados-client shell@ command calls the ssh binary on your system to make the connection. Everything after _[username@]container-uuid_ is passed through to your OpenSSH client.
38
39 h2(#Examples). Examples
40
41 Connect to a running container, using the container request UUID:
42
43 <notextile>
44 <pre><code>~$ <span class="userinput">arvados-client shell ce8i5-xvhdp-e6wnujfslyyqn4b</span>
45 root@0f13dcd755fa:~#
46 </code></pre>
47 </notextile>
48
49 The container UUID also works:
50
51 <notextile>
52 <pre><code>~$ <span class="userinput">arvados-client shell ce8i5-dz642-h1cl0sa62d4i430</span>
53 root@0f13dcd755fa:~#
54 </code></pre>
55 </notextile>
56
57 SSH port forwarding is supported:
58
59 <notextile>
60 <pre><code>~$ <span class="userinput">arvados-client shell ce8i5-dz642-h1cl0sa62d4i430 -L8888:localhost:80</span>
61 root@0f13dcd755fa:~# nc -l -p 80
62 </code></pre>
63 </notextile>
64
65 And then, connecting to port 8888 locally:
66
67 <notextile>
68 <pre><code>~$ <span class="userinput">echo hello | nc localhost 8888</span>
69 </code></pre>
70 </notextile>
71
72 Which appears on the other end:
73
74 <notextile>
75 <pre><code>~$ <span class="userinput">arvados-client shell ce8i5-dz642-h1cl0sa62d4i430 -L8888:localhost:80</span>
76 root@0f13dcd755fa:~# nc -l -p 80
77 hello
78 </code></pre>
79 </notextile>