Skip to content

Commit

Permalink
added ssh
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Eyed committed Jul 16, 2023
1 parent f374bd7 commit 66162df
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# knowledgebase
- [[SSH]]
4 changes: 4 additions & 0 deletions docs/SSH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [[ssh dir permissions]]
- [[ssh cipher benchmark]]
- [[ssh jump server]]

8 changes: 8 additions & 0 deletions docs/ssh cipher benchmark.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
```bash
for i in `ssh -Q cipher`;
do dd if=/dev/zero bs=1M cunt=100 2> /dev/null \
| ssh -c $i someuser@localhost "(time -p cat) > /dev/null" 2>&1 \
| grep real | awk '{print "'$i': "100 / $2" MB/s" }'; done
```

#ssh #cipher
2 changes: 2 additions & 0 deletions docs/ssh dir permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `chmod 0700 ~/.ssh`
- `chmod 600 ~/.ssh/authorized_keys`
25 changes: 25 additions & 0 deletions docs/ssh jump server.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Here is the example configuration of access to work PC connected to home openvpn server
```shell
Host ubuntu-rpi
HostName ubuntu-rpi
User ubuntu
RequestTTY yes
RemoteCommand tmux new-session -A -s main

Host router
HostName 192.168.1.1
User admin
Port 8888

Host srukr-redeyed-pc
HostName 10.8.0.42
User redeyed
ProxyJump router
RequestTTY yes
PasswordAuthentication yes
RemoteCommand tmux new-session -A -s main
LocalForward 60012 localhost:60012

```

Now I can access `srukr-redeyed-pc` just type `ssh srukr-redeyed-pc`

0 comments on commit 66162df

Please sign in to comment.