Lish Advantage: Never Get Locked Out of Your Linode

Feeling OK
Linode Cube
Published in
5 min readOct 6, 2016

Linode provides a simple but powerful tool that can make any system administrator’s life easier. This tool is called Lish and will ensure that every user of a Linode server will always have a way to access it. No matter what.

Lish provides an out-of-band connection to your server, granting you access while bypassing SSH. The only information required for access is a username and password that’s already set up within the server.

You’ll be able to run any commands as if you had established an SSH connection on your own terminal. Consequently, getting locked out of a server that you had configured to require a (forgotten) custom port to access will no longer be an issue for you.

Being able to connect and communicate with your server is the base requirement of being able to manage one. Lish makes sure that happens.

And how important is Lish to the company that created it? It was there from the very start — Linode was shipped with Lish available.

After seeing firsthand how useful Lish has been helping out a multitude of vexed users (I used to work with the customer support team at Linode), I’ve witnessed its power and advantage, over and over again.

Lish Fundamentals

Getting started with using Lish is pretty easy. Log into your Linode Manager, select the Linode you want, click “Remote Access” and use either Lish link at the bottom of the screen:

Clicking “Lish via Browser” will open a terminal screen from your browser, prompting you for your username and password.

“Lish via SSH” provides a command that you can use to enter into your local computer’s terminal. If the system asks for a password, you’ll need to enter your Linode user account password. Lish via SSH gives you full server capabilities without needing to sign into your Linode account.

No matter your choice, you’ll get inside your server — with full capabilities to run commands as if you were SSH’d in.

I should point out that you can add your public key to facilitate a quicker connection or disable Lish entirely. Lish is meant to make your life easier, but if for some reason you want it disable it, you can. Click on your “My Profile” link in the upper right corner of your Account screen and you can find the “Lish Settings”, showing fields for both adding a pub key and disabling Lish. You can find the instructions here in case you get lost.

Because it’s an out-of-band service, Lish doesn’t follow set SSH rules. Therefore, any specific restrictions on SSH will not bar you from a Lish connection. Such specific restrictions could include AllowUsers, PermitRootLogin, or even disable passwords.

Another great thing about Lish: you don’t have to worry about the port used for SSH or even if SSH is enabled. Lish will get you into the server as long as you have a username and password.

This can help avoid a multitude of sysadmin headaches that might involve:

  • Firewall rule changes
  • Disabled SSH
  • Using Windows and having no time to download PuTty
  • Not knowing which port SSH is on
  • Local computer not having the pub keys to SSH into the server with

Advanced Lish Tricks

Lish is more than a slick tool that gets you into your server; it’s extremely powerful for managing the server and can perform actions to it.

Access Lish from your account page by selecting either the web browser tag or SSH tag, then press ‘ctrl+a+d’. Your Lish console appears on the screen. Type ‘help’ and all the commands you can perform from here will list out.

For your convenience (and curiosity), here are all of the commands and associated actions you can perform from the Lish console:

kill — kills stuck screen sessions

exit — exits from lish

help — returns this menu of commands

[return] — connects you back to console

version — displays running kernel version

boot — boots most recently used (or the only) config profile

boot N — boots the specified config profile

shutdown — shuts down the Linode

reboot — shuts down, then boots the most recently used config profile

reboot N — shuts down, then boots the specified config profile

sysrq X — sends SysReq X to your Linode

destroy — pulls the plug on a running Linode, no fs sync, no warning

jobs — outputs the job queue for your Linode

configs — outputs the configuration profiles for your Linode

config N — outputs configuration profile details for profile N

status — outputs the status of your Linode

logview — outputs contents of console log

Once you’ve familiarized yourself with these commands, you can press ‘Enter’ to return to the screen you were at before hitting ‘ctrl+a+d’.

As you can probably guess, these commands will allow you to manage your server remotely, letting you perform actions such as booting the server with a specific configuration profile or viewing the logs of your server.

Here’s an example of what the ‘jobs’ command outputs:

True Lish Advantage

Lish is available even if your server is offline (you wouldn’t be able to sign into the server, of course, but you’d be able to manage it with commands). Whether you’re encountering difficulties connecting to your server (or the Linode Manager) because of a routing issue or a configuration issue, Lish will allow you to do what you need to get done. Gaining peace of mind with these many robust commands at your disposal really makes sleeping easier.

I use Lish all the time. It helps me diagnose issues with my own server and manage solutions. I find it invaluable. And I sleep well.

If you want to read the full guide on Lish you can find it here.

--

--

Feeling OK
Linode Cube

I'm feeling alright Customer Advocate for https://www.linode.com/, gamer, eater of vegetables (but I hate them!)