Linode Library Home
Categories
Getting Started
Beginner's Guide
Using Linux
Linode Manager
Networking
LAMP Guides
LEMP Guides
Web Servers
Web Applications
Email Guides
High Availability
SSL Guides
Databases
Server Monitoring
Development
Communications
Advanced
Troubleshooting
How to Contribute
Sitemap
Linode Library RSS Feed
Linode Library Home :: Using the Linode Manager :: Using the Linode Shell (Lish)
Print View Download PDF Download RST

Using the Linode Shell (Lish)

Author: Phil ParadisExternal Link
Published: August 4, 2009
Revised: July 20, 2010

Lish, the Linode Shell, allows you to perform certain actions without having to log into the Linode Platform Manager website. This allows you to do perform tasks like rebooting a Linode or switch configuration profiles quickly without needing to work with the Linode Manager. This capability is useful when you need quick access to control your Linode.

While Lish provides great power, its most important functionality is that it provides access to the console for your Linode. The console provides "out of band" access to your Linode. This means it allows access in cases where are unable to connect to SSH or your other administrative tools as a result of firewall settings, problems with your OpenSSH server, or a networking configuration error.

These instructions work with the Linode platform. If you don't have a Linode yet, sign up for a Linux VPS and get started today.

Connecting to Lish Link

You can connect to the LISH interface with any SSH client. This is typically Terminal.app in Mac OSX, PuTTY on Windows, or the X11 terminal of your choice. Issue the following command at a local shell prompt:

ssh [lish-username]@[host-id].linode.com

You will need to replace the bracketed text with the correct information for your Linode. The correct entries are listed in the "Console" tab in the Linode Manager. The "lish-username" is unique to your Linode, and the host id refers to the physical hardware on which your Linode is running. Lish listens for connections on ports 22, 443 and 2200.

In addition to the user name and host ID, you will also want to set up a Lish password, or provide Lish a copy of your public SSH key for more secure authentication. Note that your Lish password is not the same as the root password for your Linode, nor your Linode Manager password. Before logging in for the first time, you must either set a Lish password or add your SSH public key, both of which are available from the Console tab of the Linode Manager.

Using Lish to Gain Console Access Link

When you connect to Lish you're presented with the opportunity to log into your console. You can log in with your root (or any other) user account and password. With console access you will be able to restart sshd or tweak firewall settings if you have become unable to access your Linode through other means.

If you want to take advantage of the Lish shell you will need to detach from the screen session. Lish uses GNU Screen to provide access to the system's console. When you've logged into Lish, you can "detach" from Lish by typing C-a d, or Control-a followed by d. You do not need to log into the console to detach to get to the Lish prompt, though you can detach screen at any time when you've logged into the console.

After you detach from the console you'll be provided with a Lish prompt, where you can issue commands to control your Linode directly. If you want to get back to your console while at the Lish prompt, at any point just send an enter (e.g. hit the return key).

Using the Lish Shell Link

The Lish shell provides access to many functions otherwise only accessible via the Linode Manager web-based administration tool.

To get a full list of commands at any point, send the help command. The output of help provides an introduction to Lish functionality:

kill            - kill stuck screen sessions
exit            - exit from lish
help            - this menu

[return]        - connect to console
version         - display running kernel version
boot            - boot last used (or the only) config profile
boot N          - boot the specified config profile
shutdown        - shutdown the Linode
reboot          - shutdown, then boot the last used config profile
reboot N        - shutdown, then boot the specified config profile
sysrq X         - send SysRq X to your Linode
destroy         - pulls the plug on a running Linode, no fs sync, no warning

jobs            - view the job queue for your Linode
configs         - view the configuration profiles for your Linode
config N        - view configuration profile details for profile N
status          - view the of your Linode
keysview        - view contents of authorized_keys2
logview         - view contents of console log

Use the configs and config N (where N is the number of the configuration profile) to get a list of each configuration profiles and information regarding the configuration profile.

Remember that Lish is useful both for issuing commands to your linode like reboot and shutdown as well as accessing statistics. Such stats may include a list of pending jobs (e.g. jobs) and reports on your current Input/Output Status (io_status). Note that keysview lists the keys that are authorized to log into into Lish and the console.

Advanced Lish Tricks Link

While the Lish interface described above is useful as it provides a basic command line interface, you may find that you want to issue commands to your Linode without going through the Lish login process.

You can append Lish commands to the ssh command on your system prompt. For instance, to reboot your system, using the username and host-id for your Lish, issue the following command:

ssh [lish-username]@[host-id].linode.com reboot

Similarly, use the following command to generate a view of the log using Lish:

ssh [lish-username]@[host-id].linode.com logview

This command format works for all Lish functionality.

License Link

This guide is licensed under a Creative Commons Attribution-No Derivative Works 3.0 United States LicenseExternal Link. Please feel free to redistribute unmodified copies of it as long as attribution is provided, preferably via a link to this page.

Got a comment?

BBCode formatting is allowed. Email addresses are confidential, and are only used for gravatars and sending document/comment updates if requested. Please refer to our privacy policy. All comments are moderated and may take some time to appear on this page.