just use ssh-copy-id -i .ssh/id_rsa.pub user@REMOTESERVER-IP to install your publickey on the remoteserver. this will transfer the publickey and also install it as an authorized key.
That is a perfect quick way which others have also mentioned. I wanted to explain how it all fits together though so people can understand what's actually happening. People who already know, already know.
As stated before, your videos and your pedagogy are amazing !! If I should venture to a wish for the future, then linux tutorials is HIGH on the wish list, exactly these videos on how to get control of the CLI from "Boot to Logout".... It is absolutely incredible the power and control you get when you master an operating system the way you do. I would especially like to add how i appreciate your attitude to find out "how things work".... there are many of us who share your interest..... but very few who master it the way you do !! Thanks again.
Check out how to use the .ssh/config file. Easy enough to setup alias names for remote hosts there. .ssh/config can save a lot of typing by allowing you to setup in advance things like X11 Forwarding, tunnels and a whole lot more. Very useful when connecting to remote hosts and you traffic between local and remote hosts or need to use remote GUIs.
Nice guide, thank you! Now you are making me want to know how you changed the color of the prompt... I guess I will have to search and find out how you did that because I want my Pi's to have different colors too now!
All great tutorials lately! Will you be creating an unbound caching dns server to name your intranet hosts and black hole advertisers next? That’s probably my favorite hack! I still need to set up LDAP and a radius server to have better administrative control over my home network. Keep up the great work!
Excellent tutorial. I'm going to copy your idea regarding the shortcuts. It would work in ~/bin too I suspect. I think you did it because /usr/local/bin is in the path, right? But one question. You said that adding the passphrase defeats the purpose. How so? I have passphrases on my keys and as long as I use the ssh-add command I'm only prompted for the passphrase to add them and never prompted when I connect to the remote server. That makes sense as the only key the passphrase protects is the private one and that always stays with you, no? I'll be checking out your other vids as you do an excellent job of explaining things.
Nice vid but I would strongly advice always put a passphrase on a private key. Then on sshd disable password login and your system(s) are a lot safer, especially when connected to the Inet.
yeppers, that was my first thought- alias sshx='ssh user@host' - x being the first letter of the remote machine and then put them in the .bash_aliases file.
I dont know if its just me but if I am on windows and generate keys via putty gen, I have to delete the comments, add ssh-rsa and delete all the /n out of the pub key for linux to recognise the key.
Can you be so kind to make a similar video but for WiFi? (How to use certificates, instead of passwords) I saw in a enterprise WiFi installation that this is possible
why use ls -lh instead of ls -la. ls -la is best practise also using /usr/local/bin for scripts is sooo oldschool and outdated. Much better to shove them all in to /bin. Shorter to type too!!
You're suggesting ls -la is best "practise" (sic). Rofl. Why lh instead of la. Because a. He doesn't want to see dotfiles and b. He likes to see the size of files on disk in human readable format. Why would you bother using -la when -lh is the output you actually want to see. I may not always list my files but when I do, I do it using grep -lLhH "" ./*
just use
ssh-copy-id -i .ssh/id_rsa.pub user@REMOTESERVER-IP
to install your publickey on the remoteserver. this will transfer the publickey and also install it as an authorized key.
That is a perfect quick way which others have also mentioned. I wanted to explain how it all fits together though so people can understand what's actually happening. People who already know, already know.
As stated before, your videos and your pedagogy are amazing !!
If I should venture to a wish for the future, then linux tutorials is HIGH on the wish list, exactly these videos on how to get control of the CLI from "Boot to Logout"....
It is absolutely incredible the power and control you get when you master an operating system the way you do.
I would especially like to add how i appreciate your attitude to find out "how things work".... there are many of us who share your interest..... but very few who master it the way you do !!
Thanks again.
Thanks a lot for that. I've always wanted to know how things work.
Best and simplest explanation I have ever seen about key sharing in over 20 years of working with linux.
Agreed, done it already a few times but never really understood what it was doing until now.
I love how you didn't just show the solution but also included how you got to the solution. You are a good teacher. Thank-you!
Check out how to use the .ssh/config file. Easy enough to setup alias names for remote hosts there. .ssh/config can save a lot of typing by allowing you to setup in advance things like X11 Forwarding, tunnels and a whole lot more. Very useful when connecting to remote hosts and you traffic between local and remote hosts or need to use remote GUIs.
Defo recommend this. I use this to set up agent forwarding, etc for various hosts. Takes so much pain out of connecting to ssh.
Nice guide, thank you! Now you are making me want to know how you changed the color of the prompt... I guess I will have to search and find out how you did that because I want my Pi's to have different colors too now!
ssh-copy-id and putting names in .ssh/config could make it a bit easier, too. Depending on personal taste😉 Nice vid.
Yeah I was thinking the same thing, ssh-copy-id is so much simpler
All great tutorials lately! Will you be creating an unbound caching dns server to name your intranet hosts and black hole advertisers next? That’s probably my favorite hack! I still need to set up LDAP and a radius server to have better administrative control over my home network. Keep up the great work!
Mate this is too good. Made it look very easy and just made it look easy but make it work too! Thanks for this.
I'm not the SSH guy but this rocks for sure and I like the color identifier scheme too ...
great stuff to play around this weekend
thx
Yes sir, great posts here left and right!
Awesome thanks for this. I’ve seen many videos on this but, it was really helpful how you broke everything down.
Thank you so much you are better than a college professor..... im not exaggerating..
Thanks mate
Very nice, simple and comprehensive explanation. Thanks
Excellent tutorial. I'm going to copy your idea regarding the shortcuts. It would work in ~/bin too I suspect. I think you did it because /usr/local/bin is in the path, right? But one question. You said that adding the passphrase defeats the purpose. How so? I have passphrases on my keys and as long as I use the ssh-add command I'm only prompted for the passphrase to add them and never prompted when I connect to the remote server. That makes sense as the only key the passphrase protects is the private one and that always stays with you, no?
I'll be checking out your other vids as you do an excellent job of explaining things.
Nice vid but I would strongly advice always put a passphrase on a private key. Then on sshd disable password login and your system(s) are a lot safer, especially when connected to the Inet.
Why not simply use bash alias for the shortcuts though? Generally is a tad more clean and portable in my experience.
yeppers, that was my first thought- alias sshx='ssh user@host' - x being the first letter of the remote machine
and then put them in the .bash_aliases file.
I think using an ssh agent on Linux machines makes having passphrases very simple and thus it should be recommended IMHO
great video as always, it will speed up the connections to my pies, gracias
THX, i didn'† know the /usr/local/bin solution. This makes my life sooo much nicer
Can you please show the 4way handshake in details with packet capturing... And analyze the packets for a better understanding....
ssh-copy-id would cut this video down by half.
Agreed, however, his approach is quite impactful giving a more fundamental understanding of the subject he's explaining.
just do a edition of the file .ssh/config and ed25519 is better encryption.
I dont know if its just me but if I am on windows and generate keys via putty gen, I have to delete the comments, add ssh-rsa and delete all the /n out of the pub key for linux to recognise the key.
I tried that on Windows (since on Linux is a breeze), it all works, except that it keeps asking for password, no matter what
Everyone should be key exchange and a password for elevated commands. Always.
Can you be so kind to make a similar video but for WiFi? (How to use certificates, instead of passwords) I saw in a enterprise WiFi installation that this is possible
very well explained, sir
thank you
good info...
works ok no ssh/windows... thanks!
what to do if someone forget the ssh login password
very clean!
Silky Smooth Hopping
why use ls -lh instead of ls -la. ls -la is best practise also using /usr/local/bin for scripts is sooo oldschool and outdated. Much better to shove them all in to /bin. Shorter to type too!!
You're suggesting ls -la is best "practise" (sic). Rofl.
Why lh instead of la. Because a. He doesn't want to see dotfiles and b. He likes to see the size of files on disk in human readable format.
Why would you bother using -la when -lh is the output you actually want to see.
I may not always list my files but when I do, I do it using grep -lLhH "" ./*