Initial setting⧫
SSH connection⧫
Step 1: Downloading PuTTY⧫
- Go to the official PuTTY website: Download PuTTY.
- On the download page, you will see different versions of PuTTY. Download the version that matches your operating system.
- Once the download is complete, run the installer file you downloaded.
Step 2: Using PuTTY for an SSH connection⧫
- In the PuTTY window, you will see several options. Under “Host Name (or IP address)”, enter the IP address or host name of the remote server you want to connect to.
- Make sure the port is correct. By default, the SSH port is usually 22, but it may vary depending on the server configuration.
- Verify that the connection protocol is SSH.
- You can give your session a name in the “Saved Sessions” field at the bottom of the window. This will allow you to save the configuration for future use.
- Click the “Open” button at the bottom of the window to start the SSH connection.
- PuTTY will warn you that the server’s SSH key is unknown. Click “Yes” to accept the key and continue.
- You will be prompted to log in by entering your username and password on the remote server.
- Once connected, you will have access to the remote server command line via PuTTY. You can now run commands and interact with the server.
That’s all ! You are now connected by SSH to a remote server using PuTTY. You can use this connection to manage and administer the server using commands as needed.
Creating a Non-Root User⧫
Replace username
with the username of your choice.
Create a standard user:
adduser username
Add it to the sudo group:
usermod -aG sudo username
Package Update⧫
Update the system to get the latest software versions:
sudo apt update && sudo apt upgrade -y
Installing Git⧫
Git is an essential version control system for cloning SSDV2 script from GitHub. Install it using the following command:
sudo apt install -y git
Switching from Root to Non-Root user in Putty⧫
For the remainder of the guide, it is imperative to no longer use the root account.
Choose the method that best suits your needs. For a quick transition without closing Putty, method 2 is convenient. For a cleaner separation of sessions, method 1 is recommended.
Method 1: Closing and reconnecting⧫
This method involves closing the current Putty session and reconnecting with a non-root user.
- End current Putty session:
- Close the Putty window to end the current session.
- Reconnect with a Non-Root user:
- Open Putty again.
- When logging in, use your non-root user’s login credentials instead of the root account.
Method 2: Switch User Without Closing Putty⧫
To change users in Putty without closing the current session, the updated method is:
- Using the
su -l
command:- In the open Putty session, type
su -l username
to initiate a session as your non-root user. Replaceusername
with the actual name of the non-root user you want to use. - When prompted, enter the password of the non-root user.
- In the open Putty session, type
This command logs you in as the specified user with a shell environment that simulates a direct login for that user, resetting the environment variables and current directory to those of the targeted user. This ensures a secure and clean transition to the new user, avoiding environment and permissions issues that can arise with basic use of su
.
Cloning the SSDV2 script⧫
After installing Git, clone the SSDV2 script.
sudo git clone https://github.com/projetssd/ssdv2.git /home/${USER}/seedbox-compose
Appropriation of rights to the script folder⧫
It is important that your user has rights to the script folder to allow error-free execution. Run the following command:
sudo chown -R ${USER}: /home/${USER}/seedbox-compose