Skip to content

Commit 908091b

Browse files
authored
Merge pull request #2367 from leslitagordita/hotfix-0.7.1
[Hotfix] v0.7.1
2 parents 1975857 + 1112146 commit 908091b

File tree

15 files changed

+343
-52
lines changed

15 files changed

+343
-52
lines changed
11.9 KB
Loading
19.7 KB
Loading
14.9 KB
Loading
360 KB
Loading
Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,263 @@
1+
---
2+
author:
3+
name: Linode
4+
email: docs@linode.com
5+
description: 'Learn how to use Lish as a shell for managing or rescuing your Linode.'
6+
keywords: ["Console", "Shell", "Lish", "rescue"]
7+
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
8+
aliases: ['using-lish-the-linode-shell/','troubleshooting/using-lish-the-linode-shell/','networking/using-the-linode-shell-lish/','platform/using-the-linode-shell-lish/']
9+
modified: 2019-04-08
10+
modified_by:
11+
name: Linode
12+
published: 2009-08-04
13+
title: 'Using the Linode Shell (Lish)'
14+
hiddenguide: true
15+
---
16+
17+
18+
![Using the Linode Shell (Lish)](using-the-linode-shell-lish.jpg)
19+
20+
The Linode Shell (*Lish*) provides console access to all of your Linodes. It also allows you to perform actions like rebooting a Linode or switching to a different configuration profile without having to open the Linode Manager. Lish is also a good rescue tool. The console provides out-of-band access to your Linode, which means you can use Lish to access your Linode even when you are unable to connect directly via SSH. This is useful if firewall settings or a bad network configuration prevent you from accessing your Linode using SSH. Lish can also be useful if you need to access your secure server on a local computer whose public key has not been added to the allowed list.
21+
22+
## Connect to Lish
23+
24+
There are two ways to access Lish. You can use a terminal application to connect to a *Lish SSH gateway*, or you can log in to the [Linode Manager](https://manager.linode.com) and use the Lish console in your web browser. This section explains both methods.
25+
26+
{{< note >}}
27+
Lish used to be accessible via a direct SSH connection to your Linode's host machine, but as of May 10, 2013, all users must connect to a Lish SSH gateway to access Lish. For more information, please see [this blog post](https://blog.linode.com/2013/04/30/lish-ssh-gateway/).
28+
{{< /note >}}
29+
30+
### Use a Terminal Application
31+
32+
You can connect to Lish with the SSH client of your choice. For example, you can use the Terminal application in Mac OS X, PuTTY in Windows, or your favorite X11 terminal emulator.
33+
34+
1. Select a Lish SSH gateway. There's one in every data center. You can use any gateway to access your Linodes, but we recommend using one close to your Linode's data center. The gateway boxes are available over IPv4 and IPv6.
35+
36+
| **Lish SSH gateway** | **Data Center** |
37+
| ---------------- | -----------|
38+
| `lish-atlanta.linode.com` | US, Atlanta, GA |
39+
| `lish-dallas.linode.com` | US, Dallas, TX |
40+
| `lish-fremont.linode.com` | US, Fremont, CA |
41+
| `lish-newark.linode.com` | US, Newark, NJ |
42+
| `lish-tor1.linode.com` | Canada, Toronto, ON |
43+
| `lish-singapore.linode.com` | Asia, Singapore, SG |
44+
| `lish-tokyo.linode.com` | Asia, Tokyo, JP |
45+
| `lish-tokyo2.linode.com` or `lish-shg1.linode.com` | Asia, Tokyo, JP |
46+
| `lish-frankfurt.linode.com` | Europe, Frankfurt, DE |
47+
| `lish-london.linode.com` | Europe, London, UK |
48+
49+
1. Open a terminal window and enter the following command, replacing `username` with your Linode Manager username, and `location` with your preferred Lish SSH gateway. Lish listens for connections on ports 22, 443, and 2200.
50+
51+
ssh username@location
52+
53+
For example, logging in as `user` via the Newark gateway would look like:
54+
55+
ssh user@lish-newark.linode.com
56+
57+
{{< note >}}
58+
Users who have been granted "Access" rights on a particular Linode will have access to that Linode’s Lish console via the gateway. Linodes that a user can't access in the Linode Manager won’t show up in the Lish list. For more information about creating user accounts and configuring permissions, see [Accounts and Passwords](/docs/platform/manager/accounts-and-passwords/).
59+
{{< /note >}}
60+
61+
1. Verify that the Lish SSH gateway's fingerprint is valid by verifying the Terminal's output against the list of our [Lish Gateway Fingerprints](#lish-gateway-fingerprints). Once verified, enter *yes* to proceed.
62+
63+
{{< output >}}
64+
The authenticity of host 'lish-newark.linode.com (66.228.40.59)' can't be established.
65+
ECDSA key fingerprint is SHA256:57OGBNARJ1fhI+zrE3eTEeQWXVVDHRU8QHcP+BsWmN8.
66+
Are you sure you want to continue connecting (yes/no)?
67+
{{</ output >}}
68+
69+
{{< disclosure-note "ECDSA host key warning">}}
70+
If after verifying the authenticity of the Lish SSH gateway's fingerprint, you receive a message indicating that the ECDSA host key differs from the key for the IP address, remove the cached IP address on your local machine. Ensure you replace `192.0.2.0` with the IP address indicated by the Terminal.
71+
72+
ssh-keygen -R 192.0.2.0
73+
74+
Once you have removed the cached IP address, you can again attempt to SSH into the Lish gateway.
75+
76+
{{</ disclosure-note >}}
77+
78+
1. Enter the password you use to log in to the Linode Manager. You are now at the Lish shell. A list of your Linodes appears, as shown below:
79+
80+
Linodes located in this data center:
81+
linode241706 Newark, NJ
82+
linode276072 Newark, NJ
83+
84+
Linodes located in other data centers:
85+
linode287497 Dallas, TX
86+
87+
{{< note >}}
88+
You can add a public SSH key for Lish in the Linode Manager to automatically connect to Lish without a password. See [this section](#add-your-public-key) for more information.
89+
{{< /note >}}
90+
91+
1. At the Lish command prompt, type a Linode's name from the list. For example, typing `linode241706` will connect you to the screen console session for that Linode.
92+
1. Log in to the Linode with your username and password.
93+
94+
After you log in, you'll have console access to your Linode. You'll be able to restart services like `sshd`, edit firewall settings, and make other changes to your Linode. To exit your Linode's console, press **CTRL+A** then **D** to return to the host machine, and then press **CTRL+D** to return to the Lish menu. If you'd like to see the list of your Linodes again, type `list` from the gateway.
95+
96+
### Use a Web Browser
97+
98+
You can also connect to Lish using a web browser. This is useful when you don't have access to a terminal application, or if you just need quick and easy console access from the Linode Manager.
99+
100+
1. Log in to the Linode Manager.
101+
2. Select a Linode.
102+
3. Click on the **Remote Access** tab.
103+
4. In the **Console Access** section, click **Launch Lish Console**, as shown below.
104+
105+
[![Click Lish via Browser.](lish-via-browser.png)](lish-via-browser.png)
106+
107+
5. The Lish Web Console window appears with your Linode's console, as shown below.
108+
109+
[![Ajax Lish](1283-lish_ajax.png)](1283-lish_ajax.png)
110+
111+
6. From here, you can log in to your Linode with your root username and password, or any other username and password.
112+
113+
Now you can use the console, or exit to the Lish prompt by pressing **CTRL+A** then **D**. You cannot exit to a Lish gateway box using your web browser. To exit the session entirely, just close the Lish Web Console window.
114+
115+
### Add Your Public Key
116+
117+
If you don't want to enter your password every time you connect to Lish, you can add your public SSH key to the Linode Manager. If you haven't yet created SSH keys, please see our [Public Key Authentication with SSH](/docs/security/use-public-key-authentication-with-ssh/) guide for more information.
118+
119+
1. Log in to the [Linode Manager](https://manager.linode.com).
120+
2. Select the **my profile** link.
121+
3. Enter your password, and then click **Authenticate**, as shown below.
122+
123+
[![Re-enter your password.](1280-manager_reauth_linodedemo.png)](1280-manager_reauth_linodedemo.png)
124+
125+
4. Select the **Lish Settings** tab.
126+
5. Copy your public SSH key into the **Lish Keys** field, as shown below.
127+
128+
[![Copy your SSH public key(s) into the text field.](1282-manager_lish_keys.png)](1282-manager_lish_keys.png)
129+
130+
6. Click **Submit Keys**. Your Lish key will be saved in the Linode Manager.
131+
132+
Now you can log in to any of the Lish gateway boxes without having to type your password.
133+
134+
If you wish to disable Lish access for users without keys, use the **Authentication modes** dropdown menu on the same page, and then click **Save Setting**.
135+
136+
137+
## Understanding Lish Commands
138+
139+
The Lish shell provides access to many functions which are otherwise only accessible via the Linode Manager web-based administration tool. Enter the `help` command to see a full list of available commands. The output provides an introduction to Lish functionality:
140+
141+
kill - kill stuck screen sessions
142+
exit - exit from lish
143+
help - this menu
144+
145+
[return] - connect to console
146+
version - display running kernel version
147+
boot - boot last used (or the only) config profile
148+
boot N - boot the specified config profile
149+
shutdown - shut down the Linode
150+
reboot - shut down, then boot the last used config profile
151+
reboot N - shut down, then boot the specified config profile
152+
sysrq X - send SysRq X to your Linode
153+
destroy - pulls the plug on a running Linode, no fs sync, no warning
154+
155+
jobs - view the job queue for your Linode
156+
configs - view the configuration profiles for your Linode
157+
config N - view configuration profile details for profile N
158+
status - view the status of your Linode
159+
logview - view contents of console log
160+
161+
There are two ways to run these commands for a specific Linode. If you are at the main Lish gateway, you can prefix the command with a Linode ID, like this:
162+
163+
linode123456 logview
164+
165+
You can also bring up the Linode's console, then type **CTRL+A** then **D** to drop back to the host for that Linode. Now all of the commands above will be run for that Linode specifically. To exit back to the main Lish menu, type `exit`.
166+
167+
{{< note >}}
168+
You can activate the ability to scroll back through the Lish console by pressing **CTRL-A + ESC**
169+
{{</ note >}}
170+
171+
## Advanced Lish Tricks
172+
173+
While the Lish interface as described above is useful as a basic command-line interface, you may find that you want to issue commands to your Linode without going through the Lish login process.
174+
175+
You can directly connect to a Linode's console:
176+
177+
ssh -t [manager-username]@lish-[location].linode.com [linode-name]
178+
179+
You can also append Lish commands to the SSH command on your system prompt. For instance, to reboot your system, using your Linode Manager username, location, and the host-id for your Linode:
180+
181+
ssh -t [manager-username]@lish-[location].linode.com [linode-name] reboot
182+
183+
Similarly, you can generate a view of the log using Lish:
184+
185+
ssh -t [manager-username]@lish-[location].linode.com [linode-name] logview
186+
187+
This command format works for all Lish functionality.
188+
189+
## Lish Gateway Fingerprints
190+
191+
The valid fingerprints for the Lish gateway boxes are as follows:
192+
193+
### Atlanta
194+
195+
These are the fingerprints for the Lish gateway in our Atlanta data center (lish-atlanta.linode.com):
196+
197+
RSA 59:30:1a:0b:93:5e:3f:4b:6f:d1:96:ff:7e:9e:12:f8
198+
ECDSA SHA256:8emv5PuUgPB2GFejMYWl1f4x1yj3YqAQPAYIrBm43ZI
199+
Ed25519 SHA256:7k2c442k+zqbGaraZvmqXM3MA5lCcthaR2lbrB651lg
200+
201+
### Dallas
202+
203+
These are the fingerprints for the Lish gateway in our Dallas data center (lish-dallas.linode.com):
204+
205+
RSA 6d:3d:b5:d0:42:1c:49:45:a6:47:29:bd:88:4e:58:d4
206+
ECDSA SHA256:1fL1HTGas1APIpshCu1ZWys7LI97s8eTFN3+f8zEYXA
207+
Ed25519 SHA256:Ime9h7IAxAjBvMGR+G+EnbaLWpvXO+Z7TaGHzM9g5Sc
208+
209+
### Frankfurt
210+
211+
These are the fingerprints for the Lish gateway in our Frankfurt data center (lish-frankfurt.linode.com):
212+
213+
RSA 43:76:22:43:0e:01:cb:84:6a:80:b9:9b:90:34:c7:b1
214+
ECDSA SHA256:e1FxEXiZVi6n13tagd1ZAQEW/fsRqz29ez5IfWf9kxg
215+
Ed25519 SHA256:vG1rnoGe7XRRY0nauJREQk75OamxCwRRpeaTDB8LpgM
216+
217+
### Fremont
218+
219+
These are the fingerprints for the Lish gateway in our Fremont data center (lish-fremont.linode.com):
220+
221+
RSA 2c:43:0e:fc:88:f2:3a:dd:01:43:3a:fc:9f:67:9f:66
222+
ECDSA SHA256:fwuaKryHbvtKjFFviDocnMTNKWXUzfZSGPY8mgLgiNM
223+
Ed25519 SHA256:s3MVXFaTiL7Fb5oB0s9zMBk9VJsrkNxXXZfdeJG2enQ
224+
225+
### London
226+
227+
These are the fingerprints for the Lish gateway in our London data center (lish-london.linode.com):
228+
229+
RSA 71:27:30:cd:dc:69:7a:fe:58:4a:04:e6:6b:5f:b4:e2
230+
ECDSA SHA256:mE/plOHLl+NJ7LUdW7AaMEOnhskXZxav5Em/rD6VZ5g
231+
Ed25519 SHA256:HXHM8/wCx7NrGsnfGpaexiBfOLKN9g0hoaL9wRaSeWg
232+
233+
### Newark
234+
235+
These are the fingerprints for the Lish gateway in our Newark data center (lish-newark.linode.com):
236+
237+
RSA 11:2a:57:a4:f8:ca:42:b2:c0:ab:17:58:0d:0c:b7:8b
238+
ECDSA SHA256:57OGBNARJ1fhI+zrE3eTEeQWXVVDHRU8QHcP+BsWmN8
239+
Ed25519 SHA256:tyelNHfgaPGbN2cppfJVr/db3/pHnItR9maW+ocAS18
240+
241+
### Singapore
242+
243+
These are the fingerprints for the Lish gateway in our Singapore data center (lish-singapore.linode.com):
244+
245+
RSA 06:26:d8:2a:12:8b:2f:d7:6c:54:72:5a:a7:7b:da:7b
246+
ECDSA SHA256:rFYWuld4hWMbTzX+xZMuQ3kxiJ6t8A+FNQ5k889mKEA
247+
Ed25519 SHA256:q1G1pBrLuhsUAnZ04SOYoxVthKYyLz+wA0hBAUVkKtE
248+
249+
### Tokyo
250+
251+
These are the fingerprints for the Lish gateway in our Tokyo data center (lish-tokyo.linode.com):
252+
253+
RSA af:ec:f0:b8:87:33:d5:12:04:0d:7c:bb:a6:c5:5f:be
254+
ECDSA SHA256:smE6PUuuG6tR4N8kN8UpoPx+XyVtAwxQ2dHuwoVS6eY
255+
Ed25519 SHA256:xAs8SdX91L7Xw5q9H+GGR5N9DoPGxP5RKG3aTvR60zw
256+
257+
### Tokyo 2
258+
259+
These are the fingerprints for the Lish gateway in our Tokyo2 data center (lish-tokyo2.linode.com):
260+
261+
RSA 2c:60:9a:ce:cf:4b:8d:4e:8f:09:ae:e0:c2:b0:fb:b7
262+
ECDSA SHA256:0sRmstQ+6lfa4KwnAIQvuZMunq8KKNmu/n4KeAcAXmg
263+
Ed25519 SHA256:SWEV04SJt+DDG4ov2AfDYdZRavcg4GHufNP60QRkZzk
338 KB
Loading
337 KB
Loading
533 KB
Loading
30.7 KB
Loading
57.6 KB
Loading

0 commit comments

Comments
 (0)