1
0
Fork 0
mirror of https://codeberg.org/Mo8it/How_To_Linux.git synced 2024-11-22 00:48:02 +00:00

Done day 5

This commit is contained in:
Mo 2023-08-18 05:44:42 +02:00
parent 1fde39757e
commit 68cd68f56e
2 changed files with 8 additions and 4 deletions

View file

@ -1,3 +1,5 @@
# Day 5 # Day 5
Coming soon... In this day, we will learn how to connect to servers using SSH and work on them.
We will also learn how to use containers in Linux so that will be able to host your own website at the end!

View file

@ -20,9 +20,12 @@ ssh-keygen -t ed25519 -C "COMMENT"
Leave blank to take default for the prompt `Enter file in which to save the key (/home/USERNAME/.ssh/id_ed25519)`. Leave blank to take default for the prompt `Enter file in which to save the key (/home/USERNAME/.ssh/id_ed25519)`.
Then enter a passphrase for your key. **You should not leave it blank!** Then, you can enter a passphrase for your key.
To keep it simple while learning, we will not add one now.
Press enter twice to not use a passphrase.
**But you should use a passphrase when you work with real servers!**
### Add public key to server ### Add the public key to the server
```bash ```bash
ssh-copy-id -i ~/.ssh/id_ed25519.pub HOST ssh-copy-id -i ~/.ssh/id_ed25519.pub HOST
@ -212,5 +215,4 @@ sudo loginctl enable-linger USERNAME
Options: Options:
- `-v`, `--volume`: `SRC_PATH:DEST_PATH:L`. Label should be one of `z`, `z,ro`, `Z` or `Z,ro`. - `-v`, `--volume`: `SRC_PATH:DEST_PATH:L`. Label should be one of `z`, `z,ro`, `Z` or `Z,ro`.
- `--label "io.containers.autoupdate=registry"` for `podman auto-update`
- `-p`, `--publish`: `SERVER_PORT:CONTAINER_PORT` - `-p`, `--publish`: `SERVER_PORT:CONTAINER_PORT`