File tree Expand file tree Collapse file tree 7 files changed +47
-21
lines changed
Expand file tree Collapse file tree 7 files changed +47
-21
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ git config --global alias.ci commit
1717git 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
7070git 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 "
7474echo ' eval `ssh-agent -s`' >> ~ /.bashrc && source ~ /.bashrc
7575ssh-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
Original file line number Diff line number Diff line change 1+ # JWT
2+
3+ ##
4+
5+ ## with java
6+
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ git config --global alias.ci commit
104104git 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
110110ssh-add ~ /.ssh/* _rsa
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ ssh-copy-id -i ~/.ssh/mykey user@host
132132e.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
Original file line number Diff line number Diff line change 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
4866fi
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
Original file line number Diff line number Diff line change @@ -124,7 +124,7 @@ git config --global user.email "$MAIL_ADDRESS"
124124git 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
Original file line number Diff line number Diff line change 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
521Disable for:
You can’t perform that action at this time.
0 commit comments