Skip to main content

VPS: Initial access with SSH

This guide was created with the following products:

(Details may vary with products from different providers but the main concepts remain the same)

Introduction

Linux server products do not include a graphical management interface by default, which is why the connection and management is done via an SSH client (console). There is a wide range of SSH clients available. Below is an overview of the known / often used SSH clients.

SSH-ClientSupported operating systemsOpen-SourceDownload
PuttyWindows, LinuxYesClick
KittyWindows, LinuxYesClick
MobaXtermWindows, LinuxYesClick
SecureCRTWindows, Linux, MacNoClick
mRemoteNGWindowsYesClick

IP address & access

In the following, the connection using the Putty SSH client is explained. In the configuration window, the IP address of the server and the SSH port 22 are entered for the hostname. Afterwards, the connection establishment can be started via the Open button.

info

SSH login via password is disabled by default. If you want to log in with the password, you have to activate the option under Access & Security first.

info

When connecting to the server for the first time, a security message from Putty appears, informing you that no host key has been cached in the registry yet. This can be confirmed with Yes if you do not want to continue to receive this message every time.

This opens the SSH console and prompts for a user name and password. The user name is "root". The password can be found in the web interface under "Access & Security" or can be set there.

Administration via SSH

For optimal use of the SSH client, it is essential to know the basic commands. In the following you will find a rough overview with all relevant commands and their meaning:

Account Management

CommandDescriptionSyntax
useraddCreating a New Useruseradd [options] [options]
usermodEdit Existing Userusermod [options] [options]
userdelRemove existing useruserdel [options] [options]
passwdChange password of an existing userpasswd [options]

System Management

BefehlDescriptionSyntax
topOverview of workload, processes and other information (similar to the Windows Task Manager)top
dfDisplaying the use of storage tanks (Patition)df -h
duDisplaying the storage tank consumption (directory)du -sh *
freeMemory usage of the system. Divided into RAM and SWAP space.free
killTerminates the process with the transferred process ID (PID)kill [ID]
killallTerminates all processes with the given namekillall [name]
mvMove files or directory to a different locationmv sourcepath newPath
mkdirCreate a new directorymkdir directoryname
serviceStart, stop, restart service and check statusservice DienstName start/stop/restart/status
rebootRestarting the systemreboot

File management

CommandDescriptionSyntax
lsShow files and folders in directoryls
cdchange directorycd [OPTION] DIRECTORY
cpCopy files or directoriescp [OPTIONS] SOURCE DESTINATION
mvmove file or directorymv [OPTION] SOURCE DESTINATION
mkdirCreate new directorymkdir [OPTION] DIRECTORY NAME
rmdirRemove existing directoryrmdir [OPTION] DIRECTORY
findbrowse file systemfind [OPTIONS] [DIRECTORY] [ACTIONS]
grepSearch text filesgrep [OPTIONS] SEARCH PATTERN [FILE(S)]

Network administration

CommandDescriptionSyntax
ipQuery and configure network interfacesip [OPTIONS] OBJECT [COMMAND [ARGUMENTS]]
netstatQuery status of network interfacesnetstat [OPTIONS]
nslookupQuery DNS informationnslookup
pingCheck network connectionping [OPTIONS] DESTINATION