DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk8 min

How to Access the Terminal of Your Ubuntu Server

Access Ubuntu Server through a physical or provider console, or connect remotely with SSH. This guide covers OpenSSH installation, Ed25519 keys, safe configuration changes, troubleshooting and persistent tmux sessions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use a local console when you can reach the server physically or through your hosting provider; use SSH when the server is reachable over a network. Ubuntu Server is designed to be administered from a shell, so either route gives you the same command-line environment.

For remote access, the Ubuntu host needs an OpenSSH server and your computer needs an SSH client. Install the server, connect as an Ubuntu account, then use Ed25519 public-key authentication for routine administration. Keep a provider or physical console available whenever you change SSH settings, and run long jobs inside tmux or screen so a dropped connection does not end your work.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What “accessing the terminal” means on Ubuntu Server

Canonical describes the terminal as the primary way to interact with Ubuntu Server. A terminal is a text interface: you enter a command at a prompt and read the output printed below it. A typical prompt contains the current username and hostname followed by a dollar sign, such as admin@web01:~$. The exact prompt varies with the account, hostname and shell.

An Ubuntu Server installation often has no graphical desktop. That is normal; you do not need a window manager to administer it. You need either a console attached to the machine or a network path to an SSH service.

Choose the access route that fits your situation

Route Use it when What you need Authentication and protection Recovery if something goes wrong
Physical console You are at the server or can reach its attached equipment. Keyboard and display connected to the server. Use the local Ubuntu account and its normal login method; traffic does not cross the network. Direct access remains available even if the network or SSH service is broken.
Hosting-provider web or serial console The machine is remote but your provider exposes an out-of-band console. Provider console credentials and browser or serial-console access. The provider secures the console connection; Ubuntu SSH settings do not control this path. Use it to repair SSH configuration or regain access after a failed restart.
SSH The server is reachable over a network and you want to administer it from another computer. An OpenSSH server on Ubuntu, an SSH client on your computer, the account name and a hostname or address. OpenSSH encrypts remote control and file transfer. Authentication can use a password, a public key or another supported method. Use the physical or provider console if SSH will not start, rejects your account or becomes unreachable.

Open a local terminal

On a server with a keyboard and display

Connect the keyboard and display, power on the machine and sign in at the Ubuntu console. Cloud and rack servers may instead expose a web console or serial console in the hosting control panel. Once the console presents a login shell, you are already at the server’s terminal; no separate terminal application is required.

On Ubuntu Desktop

If the computer has Ubuntu Desktop, open the Activities overview or application launcher and search for Terminal, command, prompt or shell. The documented keyboard shortcut is Ctrl + Alt + T. This opens a local shell on that desktop computer, not automatically a shell on another server. To reach a server from it, run an SSH command after the terminal opens.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Access the server remotely with SSH

1. Make sure the OpenSSH server is installed

At a local or provider console on the Ubuntu machine, install the server package:

sudo apt install openssh-server

The command requires an account with sudo rights. If you cannot reach any console, you cannot install or repair SSH from the network alone; use the provider’s recovery or console facility first.

2. Have the connection details ready

You need the Ubuntu account name that will log in and the server’s hostname or network address. Use the account created during installation or another account that an administrator has authorized. The account name is part of the SSH command, so it is not interchangeable with your name on the client computer.

3. Connect from the client computer

Open a terminal on your Linux, macOS or other system that provides an OpenSSH client, then run:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh username@server-address

Replace username with the Ubuntu account and server-address with the server hostname or address. On the first connection, SSH may ask you to confirm the server’s host key. Verify that the key belongs to the intended machine before accepting it. You will then be prompted for the account’s configured authentication method, commonly a password unless keys have already been installed.

4. Recognize a successful login

A successful session changes the prompt to the remote account and hostname. Commands you enter now execute on Ubuntu Server, not on the client computer. A quick orientation is:

  • pwd prints the current directory.
  • ls lists files in that directory.
  • cd directory changes to a directory.
  • man command opens the full manual for a command.

To end an SSH session, run exit or press Ctrl + D. The client prompt returns when the remote shell closes.

Use SSH keys instead of typing a password each time

OpenSSH supports passwords, public-key authentication and other methods. Canonical recommends Ed25519 keys because they are shorter and require less computation than older key types. A key pair has two parts:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Private key: stays on the client computer and must be protected. Do not copy it to the server or share it.
  • Public key: is installed in the server account’s ~/.ssh/authorized_keys file. Sharing this part is expected.

Create an Ed25519 key pair

On the client computer, generate a key:

ssh-keygen -t ed25519

Accept the suggested file location or choose a specific one, and protect the private key with a passphrase. The command creates a private key and a matching public key; the public file normally has a .pub suffix.

Install the public key on the server

If password login currently works, copy the public key to the target account:

ssh-copy-id username@target_machine

Authenticate when prompted. The utility places the public key in the account’s ~/.ssh/authorized_keys file. Test a new login with ssh username@server-address before closing your existing session. Keep the current session open until the new key-based login succeeds.

Protect and recover your key access

  • Keep the private key only on trusted client storage and back it up securely.
  • Use a passphrase so possession of the key file alone is not sufficient to log in.
  • If a client is lost or compromised, remove its corresponding public-key line from the server account’s authorized_keys file using another authenticated route.
  • Do not delete your only working key or disable password access until you have tested another administrative login and confirmed a console recovery path.

Change SSH configuration without locking yourself out

Ubuntu’s main SSH daemon configuration file is /etc/ssh/sshd_config. Additional configuration snippets can be placed in /etc/ssh/sshd_config.d/. Changes can affect authentication, listening behavior and whether the daemon starts, so treat every edit as a potential access outage.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Open a second SSH session or sign in through the physical or provider console before editing.
  2. Edit the intended file with an administrator-capable editor.
  3. Save a copy of the previous configuration so you can restore it from the console if necessary.
  4. Validate the complete configuration without restarting the daemon:
    sudo sshd -t
  5. If validation returns no errors, restart the service:
    sudo systemctl restart ssh.service
  6. From another terminal, establish a fresh SSH connection and verify the account and authentication method. Keep the original session open until this test succeeds.

Canonical specifically warns that a configuration mistake can prevent sshd from starting or lock out an administrator when SSH is the only access path. A local or provider console is therefore part of a safe SSH-change procedure, not an optional extra.

Keep work running through an SSH disconnect

An SSH session carries an interactive terminal. If the network drops, the shell and foreground command can be interrupted. For updates, migrations, builds and other work that must continue, start a terminal multiplexer before running the long command.

tmux

tmux is pre-installed on Ubuntu Server according to Ubuntu’s terminal-multiplexer documentation. Start it by running:

tmux

Run your administrative command inside the tmux window. To detach while leaving the process running, press Ctrl + B, release both keys, then press D. You can safely close the SSH connection. After reconnecting, reattach to the existing session with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
tmux attach

The command and terminal state remain in the multiplexer, so you can continue viewing output rather than starting over.

screen

screen provides the same basic protection: start a screen session before the long-running work, detach without terminating it, reconnect over SSH and reattach. Choose one multiplexer and learn its detach and reattach shortcuts before relying on it during a maintenance window.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Learn commands safely from the server

Read the full manual

Use man <command> for the complete manual page. For example:

man ssh

Manual pages explain syntax, options, files and behavior in considerably more detail than a short command summary. Press Q to leave the viewer.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Get a concise option list

Many commands provide a compact overview with:

<command> --help

This is useful when you know the command but need to check an option quickly.

Search by topic

When you know what you want to do but not the command name, search manual-page descriptions:

man -k <keyword>

Ubuntu’s command-line cheat sheet also covers navigation and common commands such as pwd, ls and cd. Prefer these references to guessing options on a production server.

Troubleshoot the common access failures

“Connection refused”

The host is reachable but no SSH service is accepting the connection at the attempted endpoint. Use the physical or provider console to confirm that openssh-server is installed and that the SSH service is running. If you recently edited configuration, run sudo sshd -t and correct validation errors before restarting.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

“Connection timed out”

The client cannot complete a network connection to the server. Check that you are using the intended hostname or address and that the server is powered on and network reachable. If the network path is unavailable, use the provider or physical console; SSH cannot repair a completely unreachable network path.

“Permission denied”

The server was reached, but the account did not pass authentication. Check the username, then confirm that the account’s password or public key is the one you intended. For key login, verify that the matching public key is present in that account’s ~/.ssh/authorized_keys file and that you are connecting with the client holding the corresponding private key. Keep an already authenticated session open while correcting access.

The SSH service will not restart after an edit

Return to the console and run:

sudo sshd -t

Fix the reported syntax or option problem, then run:

sudo systemctl restart ssh.service

Test a new connection from a separate client terminal. Do not close the recovery console until the test succeeds.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The connection drops during a long command

Reconnect and look for the command inside the tmux or screen session you started before the disconnect. If you did not use a multiplexer, the command may have stopped with the shell; repeat the operation only after checking whether it made partial changes.

Operational checklist for dependable terminal access

  • Choose the local or provider console when the server is physically reachable or SSH is unavailable.
  • Install openssh-server on the Ubuntu host and use an OpenSSH client from the computer you administer from.
  • Connect with the explicit form ssh username@server-address.
  • Prefer an Ed25519 key pair; keep the private key on the client and install only the public key in ~/.ssh/authorized_keys.
  • Keep a second authenticated session or console available while changing SSH configuration.
  • Run sudo sshd -t before sudo systemctl restart ssh.service.
  • Start tmux or screen before work that must survive a dropped connection.
  • Use man, --help and man -k to verify unfamiliar commands and options.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.