ssh-keygen -t ed25519
cat ~/.ssh/id_ed25519.pub > ~/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 400 ~/.ssh/authorized_keys
chmod 400 ~/.ssh/id_ed25519
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Linux: /home/me/.ssh/config | |
# macOS: /Users/me/.ssh/config | |
# Windows: C:\Users\me\.ssh\config | |
# macOS - localhost - fish shell | |
HOST localhost | |
Hostname localhost | |
User me | |
Port 22 | |
IdentityFile /Users/me/.ssh/id_ed25519 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* get a random Integer number ∈ [minValue, maxValue) | |
*/ | |
public Integer getRandomNumberBetween(Integer minValue, Integer maxValue) { | |
if (minValue > maxValue) { | |
// swap position | |
Integer tmp = minValue; | |
minValue = maxValue; | |
maxValue = tmp; |
NewerOlder