October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Access the Terminal of Your Ubuntu Server

A practical guide to reaching an Ubuntu Server shell: local and provider consoles, SSH installation and login, Ed25519 keys, safe sshd changes, troubleshooting, and persistent tmux sessions.
Length9 min Posted Quest giverVGSources Team
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 connect remotely with SSH when it is reachable over a network. On Ubuntu Server, the terminal is the primary way to administer the system: you type commands at a shell prompt and read the results below it.

For a reliable remote workflow, install OpenSSH Server on the Ubuntu host, connect with an SSH client, prefer an Ed25519 key over a password, validate sshd configuration before restarting it, 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.

Choose the way you will access the server

The correct route depends on two questions: can you physically reach the machine, and is it reachable on the network?

Method When to use it Authentication Network exposure Recovery if something fails Session persistence
Attached keyboard and display You are beside the server or have a rack console Local Ubuntu account None Direct access remains available Ends when the local shell or machine ends
Hosting-provider web or serial console The server is remote, but the provider exposes an out-of-band console Provider and server credentials, depending on the service Usually separate from the normal network path Useful when SSH is misconfigured or the network is down Depends on the console service
SSH The server has a reachable address and an SSH service Password, public key, or another SSH method Encrypted network connection Requires a local or provider console if the SSH service is broken Use tmux or screen for disconnect-prone work

Canonical describes OpenSSH as secure, encrypted remote control and file transfer. It replaced older tools that sent passwords in clear text, so SSH is the normal choice for routine administration across a network.

Open a local terminal

Use the server’s attached console

Connect a keyboard and display to the Ubuntu machine, then sign in at the text login prompt. Some physical servers provide a dedicated console port; a hosting company may present the same function through a browser window or serial-console session. After login, you will normally see a prompt containing your username and hostname followed by $, such as alex@server01:$. Type a command after that symbol and press Enter; output appears on the following lines.

A local or provider console is especially important when you are changing SSH settings. If a configuration error prevents sshd from starting, this is the access path that lets you repair it without relying on SSH.

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

Open Terminal on Ubuntu Desktop

If the machine runs Ubuntu Desktop rather than a minimal server installation, open the Activities overview or application launcher and search for Terminal, command, prompt, or shell. Ubuntu also documents the Ctrl + Alt + T shortcut. This gives you a local shell on that desktop; it does not, by itself, open a shell on another server. To reach a different machine from it, use the SSH procedure below.

Prepare Ubuntu Server for SSH

Confirm the host and an account

You need an account that is allowed to log in and the server’s hostname or IP address. If you are using a provider, its control panel usually shows the public address and the initial account details. On a private network, use the address assigned to the Ubuntu host by that network. A DNS name works in place of an address when it resolves to the server.

Install the OpenSSH server package

Open a local or provider console on the Ubuntu host and install the service:

sudo apt install openssh-server

The package supplies the SSH daemon that listens for incoming connections. Your client computer also needs an SSH client; OpenSSH clients are included with most Linux distributions and current macOS systems, and can be installed or enabled on other operating systems.

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

Check the service before leaving the console

After installation, verify that the service is running and that the host is reachable from the client. If a firewall, cloud security rule, router, or provider access-control list blocks the SSH port, the daemon can be healthy while remote connections still fail. Keep the console session open until you have completed a successful SSH login from another computer.

Connect from another computer with SSH

Run the basic connection command

On the client, use the account name and the server’s hostname or address:

ssh username@server-address

Replace both values with your own details. If the server accepts the connection, SSH may ask you to confirm its host key the first time. Verify that the address is the server you intended to reach before accepting it. You will then be prompted for the account’s password unless key authentication is already configured.

A successful login changes your local command prompt to the remote account and hostname. Commands you type now execute on Ubuntu Server, not on the client computer. Run hostname or pwd if you need a quick reminder of where the shell is operating.

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.

Specify a non-default port

If the administrator has configured SSH to listen on a port other than the default, pass that port with -p:

ssh -p 2222 username@server-address

The port number must match the daemon’s listening configuration and every intervening firewall rule. Changing a port does not replace authentication or encryption; it only changes where the client attempts to connect.

End a session safely

When finished, type exit or press Ctrl + D. The remote shell closes and you return to the client prompt. Closing a terminal window has the same effect, but it can interrupt a command that is still running unless that command is inside a multiplexer session.

Use public-key authentication

Why keys are useful

SSH supports passwords, public keys, and other authentication methods. With public-key authentication, the private key remains on your client and the matching public key is placed in the server account’s ~/.ssh/authorized_keys file. The server can verify possession of the private key without receiving that private key.

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

Ubuntu recommends Ed25519 keys because they use a shorter key size and require fewer computational resources than older approaches. Generate one on the client with:

ssh-keygen -t ed25519

Accept the suggested file location unless you have a reason to keep several keys separate. Protect the private-key file with a passphrase; the public half has a .pub suffix and is the part that belongs on the server.

Install the public key on the server

With password login temporarily available, copy the public key to the target account:

ssh-copy-id username@target_machine

Sign in again using ssh username@target_machine. The client should offer the Ed25519 key and ask for its passphrase rather than the server account password. If you generated the key under a custom filename, tell SSH which identity to use with -i:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
ssh -i ~/.ssh/my_server_key username@target_machine

Never copy or paste the private key into the server, a ticket, or a chat message. Only the public key belongs in authorized_keys.

Understand and edit SSH configuration without locking yourself out

Know where settings live

Ubuntu’s main SSH daemon configuration is /etc/ssh/sshd_config. Additional snippets can be stored in /etc/ssh/sshd_config.d/. A setting in an included snippet can affect the final configuration just as a line in the main file can, so inspect both locations when diagnosing an unexpected behavior.

Keep a recovery path open

Do not close your working SSH connection while changing remote-access settings. Keep a second session or a local/provider console available. A typo, an invalid directive, a disabled authentication method, or an incorrect port can stop sshd from starting or prevent every new login.

Validate before restarting

After editing a configuration file, test its syntax first:

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

No output generally means the syntax check passed. If an error is printed, correct the reported file or line and run the test again. Only after a clean test should you restart the service:

sudo systemctl restart ssh.service

Test a new SSH login before ending the old one. If the new connection fails, use the still-open session or the provider console to restore the last known-good configuration.

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

Keep work running through an SSH disconnect

Start a tmux session

A network interruption normally closes the interactive shell, but commands running inside a terminal multiplexer can continue. Ubuntu’s terminal-multiplexer documentation notes that tmux is pre-installed on Ubuntu Server.

  1. Connect to the server with SSH.
  2. Start a named session:
    tmux new -s maintenance
  3. Run your update, build, backup, or server-management commands inside that session.
  4. Detach without stopping the work by pressing Ctrl + B, then D.
  5. If SSH disconnects, reconnect and list sessions:
    tmux ls
  6. Reattach to the existing session:
    tmux attach -t maintenance

The same principle works with screen. Use one multiplexer consistently so you know which command set to use when reconnecting. A multiplexer preserves the process and terminal state; it does not make a failed command succeed or protect data that the command itself did not save.

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

Learn commands from inside the terminal

Read the complete manual

For the authoritative reference for a command, run:

man command

For example, man ssh documents SSH client options and man tmux documents multiplexer behavior. Press q to leave the manual viewer.

Get a concise option list

Most command-line programs provide a shorter summary:

command --help

This is useful when you know what a command does but need to confirm an option quickly.

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

Search manual-page descriptions

If you know the concept but not the command name, search the manual database:

man -k keyword

Ubuntu’s command-line guidance also covers foundational navigation commands such as pwd (print the current directory), ls (list directory contents), and cd (change directory). Start with those before running unfamiliar administrative commands, and read the relevant manual page first.

Troubleshoot common access failures

What you see Likely area to check Safe next action
Connection timed out The address is wrong, the host is offline, or a firewall/router/provider rule blocks the SSH port Confirm the address and port from the provider or local network, then use the console to verify the host and service
Connection refused No SSH daemon is listening on the target port, or a local rule rejects it Open the local/provider console, install or start OpenSSH Server, and check the configured port
Permission denied Wrong username, password, key, or account authorization Confirm the account name, retry the intended key, and check that its public half is in the account’s authorized_keys
Host-key warning The client has a stored key for that address that does not match the server’s current key Stop and verify the server identity through a trusted console or administrator before accepting a replacement
SSH stopped accepting logins after an edit Invalid syntax or an authentication/port setting that prevents new sessions Use the existing session or provider console, run sudo sshd -t, fix the reported problem, then restart ssh.service
Long command vanished after disconnect The command was running in the ordinary interactive shell Reconnect and use a tmux or screen session for future long-running work

A safe first-login workflow

Use this sequence whenever you receive a new Ubuntu Server:

  1. Record the hostname or address, account name, and the available local or provider-console method.
  2. Open the console and install OpenSSH Server with sudo apt install openssh-server if it is not already present.
  3. From a separate computer, connect with ssh username@server-address.
  4. Confirm that the shell prompt identifies the intended host.
  5. Generate an Ed25519 key on the client with ssh-keygen -t ed25519 and install it using ssh-copy-id username@target_machine.
  6. Open a second key-authenticated session while the first remains available.
  7. For any SSH configuration change, edit the appropriate file, run sudo sshd -t, restart with sudo systemctl restart ssh.service, and verify a new login before closing the old session.
  8. Start tmux before updates, builds, backups, or other jobs that must survive a dropped connection.

What to remember

  • Local keyboard/display access and SSH are the two practical ways to reach an Ubuntu Server terminal.
  • SSH needs an OpenSSH server on the Ubuntu host and an SSH client on the computer you are using.
  • Ed25519 public-key authentication keeps the private key on the client and places only the public key in ~/.ssh/authorized_keys.
  • Always run sudo sshd -t before restarting SSH after an edit, and retain a console-based recovery path.
  • Use tmux or screen when an unstable connection must not interrupt the work.
  • Use man, --help, and man -k to investigate commands instead of guessing 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.

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

Leave a Reply

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

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.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
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.