diff --git a/Media/Convert BLURAY to H.265 HEVC with Handbrake Optimal Settings.url b/Media/Convert BLURAY to H.265 HEVC with Handbrake Optimal Settings.url new file mode 100644 index 0000000..27c9900 --- /dev/null +++ b/Media/Convert BLURAY to H.265 HEVC with Handbrake Optimal Settings.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.thewebernets.com/2023/02/20/best-optimal-settings-convert-bluray-to-h-265-hevc-with-handbrake-1080-on-mac-windows-linux/ diff --git a/Media/How a 0.2Hz Wave Took Down Two Countries Power Grids - YouTube.url b/Media/How a 0.2Hz Wave Took Down Two Countries Power Grids - YouTube.url new file mode 100644 index 0000000..113a669 --- /dev/null +++ b/Media/How a 0.2Hz Wave Took Down Two Countries Power Grids - YouTube.url @@ -0,0 +1,2 @@ +[InternetShortcut] +URL=https://www.youtube.com/watch?v=DK8mw07DcPQ diff --git a/ZFS/ZFS command line reference Cheat Sheet.pdf b/ZFS/ZFS command line reference Cheat Sheet.pdf new file mode 100644 index 0000000..a5ad236 Binary files /dev/null and b/ZFS/ZFS command line reference Cheat Sheet.pdf differ diff --git a/ssh/Passwordless ssh connection from Windows.md b/ssh/Passwordless ssh connection from Windows.md new file mode 100644 index 0000000..13aab9f --- /dev/null +++ b/ssh/Passwordless ssh connection from Windows.md @@ -0,0 +1,67 @@ +# Passwordless ssh connection from Windows + +## Create and Install SSH Key + +First of all, we need to create a new key in the Windows pc (where we start the connection) using: + +`ssh-keygen -t rsa` + +Don't change the default path or remember where you saved the key, it will be used for the next command. Press enter another two times to avoid using a passphrase (if you don't want it). + +After that, if you haven't change the default path, the key will be created into `{USERPROFILE}\.ssh\id_rsa.pub`. + +Now, you can usually use the command `ssh-copy-id` for installing the key on the remote host, but unfortunately this command is not available on Windows, so we have to install it using this command: + +`type $env:USERPROFILE\.ssh\id_rsa.pub | ssh {REMOTE_HOST} "cat >> .ssh/authorized_keys"` + +or if your key is not in the default path: + +type `{RSA_KEY_PATH} | ssh {REMOTE_HOST} "cat >> .ssh/authorized_keys"` +and replace the `{RSA_KEY_PATH}` with your RSA path. + +Replace `{REMOTE_HOST}` with the remote host IP/Name (like `pi@192.168.0.1`), launch the command, insert the password if required, and the work is done! + + +## Hosts + +### docker-01.home.ramberg.net + +`$env:USERPROFILE\.ssh\id_rsa.pub | ssh rcadmin@docker-01.home.ramberg.net "cat >> .ssh/authorized_keys"` + +### database.home.ramberg.net + +`$env:USERPROFILE\.ssh\id_rsa.pub | ssh rcadmin@database.home.ramberg.net "cat >> .ssh/authorized_keys"` + + +## IMPORTANT! + +### SETTING UP `.ssh` FOLDER + +If the `~/.ssh` folder is not existing in your remote host, you need to configure them, this is usually done by the command `ssh-copy-id`, but we can not access to this power from Windows! You need to connect to the remote host in ssh and create the `.ssh` directory and the `authorized_keys` file for the first time: + +``` +ssh {REMOTE_HOST} +Create the .ssh directory: +mkdir ~/.ssh +Set the right permissions: +chmod 700 ~/.ssh +Create the authorized_keys file: +touch ~/.ssh/authorized_keys +Set the right permissions: +chmod 600 ~/.ssh/authorized_keys +``` + +### NOTE + +The `authorized_keys` is not a folder, if you try to create it using `mkdir`, the SSH connection passwordless will not work, and if you debug the ssh on the host, you will notice an error/log similar to: + +~/.ssh/authorized_keys is not a key file. + +### ADD YOUR SSH KEY ON YOUR AGENT + +Run those two lines on your Windows pc to add the created key on your cmd/powershell: + +``` +ssh-agent $SHELL +ssh-add +```