Skip to content
Snippets Groups Projects
Commit fa2208ec authored by Michael Blaschek's avatar Michael Blaschek :bicyclist:
Browse files

Update SSH-VPN-VNC/Questions.md

parent 1e405b6e
Branches
Tags
No related merge requests found
......@@ -4,7 +4,7 @@ Please feel free to add you questions and anwsers.
[[_TOC_]]
## Q: ssh using key authentication?
## Q: How to use ssh-key authentication?
In order to connect passwordless to a remote server a key needs to be generated.
```
......@@ -29,11 +29,34 @@ The key's randomart image is:
| |
+----[SHA256]-----+
```
It is recommended to use a password to encrpyt the private key `.ssh/id_rsa`. However, this password is then required to login.
Todo add infos on `ssh-agent`
It is recommended to use a password to encrpyt the private key `.ssh/id_rsa`. However, this password is then required each time to login. Using an `ssh-agent` can solve that problem.
# Q: How to transfer files between two VPN networks?
## Q: How to use an ssh-agent?
Using an SSH-Agent will make your connection even safer, as your private key is encrypted with a passphrase. To create a ssh-key goto [How to use ssh-key authentication?](#How-to-use-ssh-key-authentication?).
Continue with how to use the ssh-agent:
```bash
# Launch the SSH Agent
eval `ssh-agent`
# this will add your ssh-keys from ~/.ssh/
# You will be asked a passphrase if you have one
# this will add .ssh/id_rsa as default
ssh-add
# or any keyfile you created:
ssh-add .ssh/secret_key
# Copy the ssh-key (pub) to the server
ssh-copy-id [user]@[server]
# and connect
ssh [user]@[server]
# Kill the agent and all store secure information
ssh-agent -k
```
**Tip: configure your `.ssh/config` file to use the correct key a server. Goto [SSH](SSH.md)**
[Nice summary of how an ssh-agent works](https://smallstep.com/blog/ssh-agent-explained/)
## Q: How to transfer files between two VPN networks?
You should be able to use an SSH tunnel via a gateway server
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment