Skip to content

Commit 4cfdcfa

Browse files
committed
update ssh-keygen commands
1 parent 18d43c1 commit 4cfdcfa

File tree

7 files changed

+47
-21
lines changed

7 files changed

+47
-21
lines changed

docs/git.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ git config --global alias.ci commit
1717
git config --global alias.st status
1818

1919
## generate ssh key
20-
ssh-keygen -t rsa -b 4096 -C "$MAIL_ADDRESS"
20+
ssh-keygen -t ed25519 -b 4096 -C "$MAIL_ADDRESS"
2121

2222
# add ssh key agent for passwort prompt
2323
# see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent
@@ -70,7 +70,7 @@ git config --global alias.ci commit
7070
git config --global alias.st status
7171

7272
# ssh
73-
ssh-keygen -t rsa -b 4096 -C "$MAIL_ADDRESS"
73+
ssh-keygen -t ed25519 -b 4096 -C "$MAIL_ADDRESS"
7474
echo 'eval `ssh-agent -s`' >> ~/.bashrc && source ~/.bashrc
7575
ssh-add ~/.ssh/*_rsa
7676

@@ -251,7 +251,7 @@ git tag -d 1.2.3
251251
## ssh generate keys
252252

253253
```shell
254-
ssh-keygen -t rsa -b 4096
254+
ssh-keygen -t ed25519 -b 4096
255255
```
256256

257257
## ssh remember passphrase

docs/jwt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# JWT
2+
3+
##
4+
5+
## with java
6+

docs/linux (debian based)/copypasta_for_cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ git config --global alias.ci commit
104104
git config --global alias.st status
105105

106106
# ssh keygen
107-
ssh-keygen -t rsa -b 4096
107+
ssh-keygen -t ed25519 -b 4096
108108

109109
# remember ssh password
110110
ssh-add ~/.ssh/*_rsa

docs/linux (debian based)/linux_operations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ ssh-copy-id -i ~/.ssh/mykey user@host
132132
e.g. for authentication on another machine where the public/private key pair is authorized
133133

134134
```shell
135-
ssh-keygen -t rsa -b 4096
135+
ssh-keygen -t ed25519 -b 4096
136136
```
137137

138138
### Allow user to use sudo

docs/linux (debian based)/network_ssh.md

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
# SSH
22

3-
## general overview
3+
4+
## generate ssh key
5+
6+
The -i flag for connection can be omitted if the standard file names id_ALGORITHM (private key) and id_ALGORITHM.pub (public key) are used.
7+
8+
```shell
9+
# generate a private and public key pair in ~/.ssh/ folder
10+
ssh-keygen -t ed25519 -b 4096
11+
12+
# in specifig folder
13+
ssh-keygen -t ed25519 -b 4096 -f /tmp/
14+
15+
# needed permisions of files. Normally created automatically
16+
chmod 700 ~/.ssh
17+
chmod 644 ~/.ssh/id_ed25519.pub
18+
chmod 600 ~/.ssh/id_ed25519
19+
```
20+
21+
## connect via ssh
422

523
```shell
624
# add -v for verbose mode
@@ -48,20 +66,6 @@ if ! check_key_added; then
4866
fi
4967
```
5068

51-
## generate ssh key
52-
53-
The -i flag can be omitted if the standard file names id_rsa (private key) and id_rsa.pub (public key) are used.
54-
55-
```shell
56-
# generate a private and public key pair in ~/.ssh/ folder
57-
ssh-keygen
58-
59-
# permisions of pub files
60-
chmod 700 ~/.ssh
61-
chmod 644 ~/.ssh/id_rsa.pub
62-
chmod 600 ~/.ssh/id_rsa
63-
```
64-
6569
## trust ssh key on remote server
6670

6771
```shell

docs/mac.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ git config --global user.email "$MAIL_ADDRESS"
124124
git config --global core.hooksPath .githooks
125125

126126
## generate ssh key
127-
ssh-keygen -t rsa -b 4096 -C "$MAIL_ADDRESS"
127+
ssh-keygen -t ed25519 -b 4096 -C "$MAIL_ADDRESS"
128128

129129
# add ssh key agent for passwort prompt
130130
# see https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent#adding-your-ssh-key-to-the-ssh-agent

docs/spring/spring_security.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Spring security
22

3+
## add custom authentication
4+
5+
- implement AuthenticationProvider in you own class
6+
- and register it via
7+
-
8+
9+
- nice example: https://github.com/dewantrie/springboot-custom-authentication-provider/blob/master/src/main/java/com/example/demo/config/SecurityConfig.java
10+
11+
12+
- Authentication
13+
- AuthenticationProvider
14+
- AuthenticationManager
15+
- UserDetailsService
16+
- UserDetails
17+
- SecurityFilterChain
18+
319
## Configure exception for auth filter
420

521
Disable for:

0 commit comments

Comments
 (0)