Skip to content

Commit

Permalink
upd
Browse files Browse the repository at this point in the history
  • Loading branch information
romankurnovskii committed May 16, 2024
1 parent 1cf2dc6 commit 34c16a7
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 11 deletions.
4 changes: 3 additions & 1 deletion config/_default/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ enableEmoji: true
enableGitInfo: true
summaryLength: 78

googleAnalytics: G-26F2C5ZR4Y
Services:
GoogleAnalytics:
ID: G-26F2C5ZR4Y

markup:
tableOfContents:
Expand Down
6 changes: 3 additions & 3 deletions content/posts/linux/ubuntu-server-initial-setup.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ apt update
apt upgrade -y
```


## Setting Up SSH Keys

Using SSH keys instead of passwords enhances security. First, generate an SSH key pair on your local machine (if you don't already have one):
Expand All @@ -41,21 +40,22 @@ ssh-copy-id -p 1234 username@your_server_ip
This command uploads your public SSH key and configures the server to recognize it.

## Disabling Password Authentication

To prevent SSH login using a username and password, edit the SSH configuration file:

```sh
sudo nano /etc/ssh/sshd_config
```

Find the following lines and modify them as shown:

```plaintext
PasswordAuthentication no
UsePAM no
```

After making these changes, restart the SSH service to apply them:

```bash
sudo systemctl restart sshd
```


Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class Solution:
def findMaxK(self, nums: List[int]) -> int:
s = set(nums)
return max((x for x in s if -x in s), default=-1)
```
```
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ class Solution:
def findMaxK(self, nums: List[int]) -> int:
s = set(nums)
return max((x for x in s if -x in s), default=-1)
```
```

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"Target":"css/yalla.min.77c6f491bb7ebddfe04a3321d28ee30ecda71f7cfaded08be1e3e3b5535d215aaae10c27f703d408e2e59cb2f35e05e2.css","MediaType":"text/css","Data":{"Integrity":"sha384-d8b0kbt+vd/gSjMh0o7jDs2nH3z63tCL4ePjtVNdIVqq4Qwn9wPUCOLlnLLzXgXi"}}
{"Target":"css/yalla.min.32eb10cbdb6a563001e1dde55476a356af9f049b9d96ad594c830c18e707c8636bb64b0b8e2ee0d42c0bb161a20dc0d5.css","MediaType":"text/css","Data":{"Integrity":"sha384-MusQy9tqVjAB4d3lVHajVq+fBJudlq1ZTIMMGOcHyGNrtksLji7g1CwLsWGiDcDV"}}
66 changes: 64 additions & 2 deletions static/search/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -7913,6 +7913,14 @@
"tags": [],
"lang": "ru"
},
{
"uri": "/tracks/algorithms-101/leetcode/easy/2441/",
"title": "2441. Largest Positive Integer That Exists With Its Negative",
"description": "2441. Largest Positive Integer That Exists With Its Negative",
"content": "\nLeetCode problem 2441\n\nclass Solution:\n def findMaxK(self, nums: List[int]) -> int:\n nums.sort()\n p1 = 0\n p2 = len(nums)-1\n\n while p1 int:\n s = set(nums)\n return max((x for x in s if -x in s), default=-1)\n`",
"tags": [],
"lang": "ru"
},
{
"uri": "/tracks/algorithms-101/leetcode/easy/2427/",
"title": "2427. Number of Common Factors",
Expand Down Expand Up @@ -11249,7 +11257,7 @@
"uri": "/posts/vps-docker-subdomains-setup/project/projects/3/",
"content": {
"log": {
"timeTakenInMilliseconds": 3
"timeTakenInMilliseconds": 4
},
"result": "Hello World!",
"ranges": [
Expand Down Expand Up @@ -11695,7 +11703,7 @@
"title": "Blank",
"content": {
"log": {
"timeTakenInMilliseconds": 1
"timeTakenInMilliseconds": 9
},
"result": "Write anything you like here!",
"ranges": [
Expand Down Expand Up @@ -19586,6 +19594,14 @@
"tags": [],
"lang": "en"
},
{
"uri": "/tracks/algorithms-101/leetcode/easy/2441/",
"title": "2441. Largest Positive Integer That Exists With Its Negative",
"description": "2441. Largest Positive Integer That Exists With Its Negative",
"content": "\nLeetCode problem 2441\n\nclass Solution:\n def findMaxK(self, nums: List[int]) -> int:\n nums.sort()\n p1 = 0\n p2 = len(nums)-1\n\n while p1 int:\n s = set(nums)\n return max((x for x in s if -x in s), default=-1)\n`",
"tags": [],
"lang": "en"
},
{
"uri": "/tracks/algorithms-101/leetcode/easy/2427/",
"title": "2427. Number of Common Factors",
Expand Down Expand Up @@ -22508,6 +22524,17 @@
],
"lang": "en"
},
{
"uri": "/posts/linux/ubuntu-server-initial-setup",
"title": "Initial Setup Guide for Ubuntu 22.04 on a VPS",
"description": "Initial Setup Guide for Ubuntu 22.04 on a VPS",
"content": "\nUpdate and Upgrade Packages\n\napt update\napt upgrade -y\n\nSetting Up SSH Keys\n\nUsing SSH keys instead of passwords enhances security. First, generate an SSH key pair on your local machine (if you don't already have one):\n\nssh-keygen -t ed25519 -C \"your_email@example.com\"\n\nNext, copy your public SSH key to the new user's account on your server. You can do this from your local machine:\n\nssh-copy-id username@your_server_ip\n\nor with provided port\nssh-copy-id -p 1234 username@your_server_ip\n\nThis command uploads your public SSH key and configures the server to recognize it.\n\nDisabling Password Authentication\nTo prevent SSH login using a username and password, edit the SSH configuration file:\n\nsudo nano /etc/ssh/sshd_config\nFind the following lines and modify them as shown:\n\nPasswordAuthentication no\nUsePAM no\nAfter making these changes, restart the SSH service to apply them:\n\nsudo systemctl restart sshd\n\n\n",
"tags": [
"Linux",
"Ubuntu"
],
"lang": "en"
},
{
"uri": "/posts/linux/nmap-cheatsheet",
"title": "nmap - cheatsheet",
Expand Down Expand Up @@ -22693,6 +22720,28 @@
],
"lang": "en"
},
{
"uri": "/posts/defi/karak.network",
"title": "karak.network",
"description": "Karak Network invite codes",
"content": "\nInvite codes:\n\nmMUbV\nIoav9\ncujFC\n\nBe prepared for the Karak airdrop! \"Unlock bonus XP points and climb ranks with invite code mMUbV.\n\nMaximize your rewards by seizing every XP point for your final airdrop allocation. Don't miss out on this opportunity to optimize your rewards!\"\n\nEnter the code mMUbV during registration at https://app.karak.network/!\n\n",
"tags": [
"defi",
"defi codes"
],
"lang": "en"
},
{
"uri": "/posts/defi/blast.io",
"title": "blast.io",
"description": "blast.io invite codes",
"content": "\nCodes:\nOL52U\n\nGo to site https://blast.io/en/airdrop/sign-up\nEnter code OL52U\nhttps://blast.io/OL52U\n\n",
"tags": [
"defi",
"defi codes"
],
"lang": "en"
},
{
"uri": "/posts/cloud-exam-quizz/amplify-setup-project",
"title": "AWS Amplify - project setup with Github",
Expand Down Expand Up @@ -22894,5 +22943,18 @@
"tags": [],
"lang": "en"
}
],
"en copy": [
{
"uri": "/posts/defi/blast.io",
"title": "blast.io",
"description": "blast.io invite codes",
"content": "\nCodes:\nOL52U\n\nGo to site https://blast.io/en/airdrop/sign-up\nEnter code OL52U\nhttps://blast.io/OL52U\n\n",
"tags": [
"defi",
"defi codes"
],
"lang": "en copy"
}
]
}
2 changes: 1 addition & 1 deletion static/search/lunr-index.json

Large diffs are not rendered by default.

0 comments on commit 34c16a7

Please sign in to comment.