The Beginner's Guide To SSH

Sdílet
Vložit
  • čas přidán 19. 05. 2024
  • SSH (the Secure Shell) is a program for logging into a remote machine and for executing commands on a remote machine. Often, SSH is the only way to access remote web servers. In this video, I'll show you how to install and use SSH, and how to create SSH key pairs which allows you remote access without the need of a password.
    REFERENCED:
    ► wiki.archlinux.org/title/OpenSSH
    WANT TO SUPPORT THE CHANNEL?
    💰 Patreon: / distrotube
    💳 Paypal: www.paypal.com/cgi-bin/webscr...
    🛍️ Amazon: amzn.to/2RotFFi
    👕 Teespring: teespring.com/stores/distrotube
    DONATE CRYPTO:
    💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
    🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
    📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ
    SOCIAL PLATFORMS:
    🗨️ Mastodon: distrotoot.com/@derek
    👫 Reddit: / distrotube
    📽️ LBRY/Odysee: odysee.com/$/invite/@DistroTu...
    DT ON THE WEB:
    🕸️ Website: distrotube.com/
    🐿️ Gemini Capsule: gemini://distro.tube
    📁 GitLab: gitlab.com/dwt1
    FREE AND OPEN SOURCE SOFTWARE THAT I USE:
    🌐 Brave Browser - brave.com/dis872
    📽️ Open Broadcaster Software: obsproject.com/
    🎬 Kdenlive: kdenlive.org
    🎨 GIMP: www.gimp.org/
    🎵 Audacity: www.audacityteam.org/
    💻 VirtualBox: www.virtualbox.org/
    🗒️ Doom Emacs: github.com/hlissner/doom-emacs
    Your support is very much appreciated. Thanks, guys!
  • Věda a technologie

Komentáře • 110

  • @alexmelillo1247
    @alexmelillo1247 Před 2 lety +43

    Hey man. Sysadmin here. I have been using SSH for a loooong time and this video wasn't really aimed towards me but I just wanna say, thanks for putting this stuff out there

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety

      Can't anyone that runs their own Linux machine call themselves a "sysadmin"?

    • @alexmelillo1247
      @alexmelillo1247 Před 2 lety +3

      @@terrydaktyllus1320 sure. I just get paid to handle other people's machines :p

    • @Phydoux2112
      @Phydoux2112 Před rokem

      Agreed! Great stuff! I usually use SSH to copy stuff from one machine to another. I think SSH is perfect for that. You can also setup an FTP server on the receiving computer as well but ssh is a nice round trip sort of deal where you can log into a machine from either end. I usually use pcmanfm to copy files from one computer to another. It's really convenient to do that. Much better than running a USB stick back and fourth between machines (sneakernet).

    • @RayChavez
      @RayChavez Před 7 měsíci

      @@terrydaktyllus1320 if you have root privileges, pretty much 🤭

  • @owobooperlv7673
    @owobooperlv7673 Před 2 lety +1

    Man, literally just put learning ssh on my todo list a day or two ago, and you are once again my savior. Thanks for the awesome content DT!

  • @MarcusPHagen
    @MarcusPHagen Před 2 lety +1

    Thank you, DT! This is exactly what I needed. I'm installing Ubuntu on a Raspberry Pi cluster which I'm using for learning about cluster management. This walked me through everything I will need to set up SSH key-only access, & use a FOSS app to log into them all at once with tabbed access from my main machine.

  • @sujayr6983
    @sujayr6983 Před 2 lety +4

    I wish I watched this video before I started learning networking stuff. I remember, I spent a whole day trying to get SSH to work. There are very few tutorials online. Thanks DT!

  • @mertgokbulut8676
    @mertgokbulut8676 Před 2 lety +13

    Hey DT, I really enjoyed this introductory video to ssh. I am trying to learn emacs after I learned vim and I noticed that you mentioned in some of your videos that you are running daemon processes for them. I know what daemons are conceptually however it would be great if you can make an introductory video about how to use them. I really enjoy how you clearly explain these concepts and love your vids :)

  • @gabrielanagnostidescerante4784
    @gabrielanagnostidescerante4784 Před 9 měsíci +1

    Hey DT, I've used linux my whole life, but just recently I decided to take it more seriously and have even scheduled my LPIC-1. It still surprises me how well laid out your videos are. I can watch many videos, but it's normally in yours that it clicks. Thanks for your contribuition and keep up the good work.

  • @neil101
    @neil101 Před 2 lety +3

    Hey DT. I'm an absolute beginner to Linux, but this video is the best intro to SSH, by a long way.
    Thanks and keep up the good work.

  • @nathannjh
    @nathannjh Před 2 lety +3

    Wow, just doing my first SSH file transfer yesterday. Can't wait to watch, Thanks DT!

  • @jaejaneiropt
    @jaejaneiropt Před 2 lety +2

    I start to study SSH this year. I saw and studied other stuff like a litle more advanced level on SSH, but let me tell you that this is a very good begginers guide, there are some stuff in here that I didn´t know. Thank you for this video too. Very good channel, congratulations

  • @MichaelVash7886
    @MichaelVash7886 Před 2 lety +5

    Good video. One minor thing I'd point out is that the passphrase is being authenticated locally by the cert vs by the server which is more secure than trying to authenticate via a password on the server. I can see people hearing this and not quite understanding when you said its best to remove password authentication and then turn around and enter a passphrase.

  • @UnspankableGoose
    @UnspankableGoose Před 2 lety +3

    This is the one ssh video that's actually good, and detailed.

  • @hasanhuseyinyurdagul5403
    @hasanhuseyinyurdagul5403 Před 2 lety +3

    Every time he says super complicated password... Masterpiece
    I can hear him say that 1000000 times.

  • @CoronaMatin
    @CoronaMatin Před 9 měsíci

    Great breakdown of how SSH works

  • @estevaomendes2305
    @estevaomendes2305 Před 2 lety +1

    Didn't know it was this simple to connect to your VMs. Gonna test and learn more about ssh using my VMs.

  • @martinvandenbroek2532
    @martinvandenbroek2532 Před 2 lety +3

    Looking forward to the next episode that explains some more advanced SSH tips and tricks 😉

    • @matthewrease2376
      @matthewrease2376 Před 2 lety

      @Terminalforlife (LL) I feel like I remember seeing a video about sshfs from him recently but perhaps it another Linux CZcamsr...

  • @mpsii
    @mpsii Před 2 lety +3

    Talk about timing. I needed this.

  • @jacksystems
    @jacksystems Před 2 lety +2

    Great info for managing my web server, thanks DT!

  • @akwalek
    @akwalek Před 2 lety +3

    Thanks for posting, very informative!

  • @furiousfellow1583
    @furiousfellow1583 Před 2 lety +2

    Damn! You've got some serious teaching skills!! Thanks for the vid

  • @Cilotto83
    @Cilotto83 Před 4 měsíci

    thanks man i am getting started after like 20 years off computers. got forced to stop at the time of win millenium after getting a visit from the italian "nopt" police and getting sentenced with 3 years computer ban wich made me get away from computer. i am now starting to play with overthewire and this teached me A LOT. really appreciate. i think i will havbe to use this channel A LOT while playing.

  • @enzomon27
    @enzomon27 Před 2 lety +4

    Ready to watch this video.

  • @fatriantobong8169
    @fatriantobong8169 Před 6 měsíci

    Demystifying...some folks teach like throwing tons of unfamiliar terms which confuses listeners.so good job

  • @1rk1n
    @1rk1n Před 2 lety +3

    How do you exponentially thumbs up super handy videos? it only let me thumbs it up once, and it needs 5000 more.

  • @WahjoeGunawan
    @WahjoeGunawan Před rokem

    excellent explanation, very concise, thank you

  • @magnusanderson6681
    @magnusanderson6681 Před 2 lety +13

    Never miss a chance to show off your super strong and complicated password do you? :P

  • @NemoOhd20
    @NemoOhd20 Před 3 měsíci

    excellent introduction. thank you

  • @QuarKSonTV
    @QuarKSonTV Před 2 lety +1

    Great content, keep it up

  • @rohitk9756
    @rohitk9756 Před 2 lety

    Hey DT, How is the ZSA Moonlander, I'm thinking of purchasing it. Also great video!

  • @zeppelinmexicano
    @zeppelinmexicano Před 2 měsíci

    This is a good one.

  • @moepikd
    @moepikd Před měsícem

    3:41 One thing to keep in mind is the SSH daemon on Arch Linux is actually called "sshd" and not just "ssh".

  • @bhaveshverma8629
    @bhaveshverma8629 Před 2 lety

    Very good information sir

  • @ShitTot
    @ShitTot Před 2 lety +1

    Good video... but also...
    Drinking game:
    take a shot of beer every time 'local machine' is said.
    take a shot of liquor every time 'remote machine' is said.
    Good luck.

  • @giacomodelillo1719
    @giacomodelillo1719 Před 2 lety +4

    Hey, Dt! Just asking, ever thought to create a podcast? Just the audio of your FAQ or something else

    • @mikaelrask
      @mikaelrask Před 2 lety +2

      check out hes videos hey dt.

  • @johannesrodt290
    @johannesrodt290 Před 2 lety +3

    Could you make a video about configuring nyxt

  • @abidalica
    @abidalica Před rokem

    Great video

  • @kIrani1
    @kIrani1 Před 3 měsíci

    Thank you Mr. Fravahar. Your programs are very enlightening. #KingRezaPahlavi

  • @vim449
    @vim449 Před 2 lety +1

    Do you think you could make a full video about TRAMP?

  • @9MAS91
    @9MAS91 Před 2 lety

    Do you have a setup / info on how you setup your terminal in this videos I like the colorscheme and tie fighters

  • @chessgo5028
    @chessgo5028 Před rokem

    the fact that you are connected to the virtual machine makes and at the same time trying to communicate with it from your local makes it very complicated for beginners to understand.

  • @praetorxyn
    @praetorxyn Před 2 lety

    The password on SSH keys thing is tricky, because as a developer I mostly want to use SSH authentication for Git so I don't have to enter passwords, and that defeats the purpose. SSH agent can authenticate for you, but I don't know if you have to reauthenticate to SSH agent every time you open a new terminal / tab or if just doing it once every reboot would be sufficient. My guess is that you'd have to do it every terminal, so that's why I don't tend to put passwords on there if I don't have to.

  • @AceTop
    @AceTop Před 2 lety

    Hey DT, the passphrase you have to enter only the first time on the remote machine, and then not any more.

  • @kellingc
    @kellingc Před 2 lety +5

    SSH is cool. So, got the command line - how complex is it to get X or Wayland to see the remote as a client, and the remote cimputer ro use the server's X or Wayland server (yes, this is a loaded question)?

    • @DistroTube
      @DistroTube  Před 2 lety +7

      Most servers aren't going to have a display server installed. But...you can use X11 forwarding to run GUI apps remotely. It's not a great experience though. Teamviewer is probably what most people use for something like this though, but Teamviewer is proprietary poo. :D

    • @mezlo64
      @mezlo64 Před 2 lety +3

      hi you might be looking for x11vnc or VNC in general.

    • @Gabifuertes
      @Gabifuertes Před 2 lety +1

      @@mezlo64 +1 for vnc

    • @mitchmarq428
      @mitchmarq428 Před 2 lety +2

      Directly forwarding an X window is doable, but theming and stuff sometimes get broken. Also, it is slow.

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety

      @@mitchmarq428 Wow! So here's a person who need remote access to computers and the first thing he cares about is how his window borders look?

  • @reverseila4363
    @reverseila4363 Před 2 lety +1

    hey dt, could you make a video on the process of installation itself? by that I mean the process that is shared among installation of all linux distros:
    - what does partitioning the disk(s) means
    - what is the meaning to create file system on top of a partition
    - what does chroot means
    - why the process of installation differs between uefi and legacy bios
    - mistakes before, during, and after base installation
    this is a somewhat exhastive list of things to cover, but hopefully these can offer basic and fundamental knowledge of installation to newbie linux users like me.

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety

      Have you not thought about just reading a Linux book or two, or buying a cheap Linux CBT? Why's it his responsibility to provide your Linux education free-of-charge? The only people who should start trying to use Linux are those who are willing to sit down and put some effort in themselves to learn it.
      Do you drive a car? Because you have to put in a lot of expense, time and effort to learn to drive, probably because it's something you need to do. Why is it different learning to use a computer properly.
      Unfortunately, you demonstrate the core difference between millennials and boomers like me - I developed the patience to sit down and just learn what I know and I am still learning by listening to experts, reading books and guides, and trying things out for myself. That has paid off over the years, I work in a good job in Linux cyber-security, all of it is self-taught.
      Far too many millennials (not all of them) don't want to put in any effort themselves - they want everything "delivered on a plate to them".

    • @reverseila4363
      @reverseila4363 Před 2 lety

      @@terrydaktyllus1320 @Terry Daktyllus first of all, i don't care who should use and not use linux. its just an os. nothing more. a tool. just like a spoon. you know.
      You're comparing using a computer with using a car. ok :)
      just because I'm asking him to cover a topic, Do you think I'll wait for him to only be taught by him?
      is watching videos on youtube free of charge? i pay to my isp. probably it doesn't cost so much in your country.
      This isn't resposibility of anybody to educate me or you on youtube. I'm just suggesting on what topics he may wants to create a video or two, you know giving him some ideas. Just think about it, why even dt create videos. For example this video. Probably ssh is a useful/popular tool to cover a tutorial on. I don't remember if I asked dt to create a video on ssh but he did it anyway. maybe other people asked him. You seem to not watch the end of his videos. he thanks people who support him. he probably creates videos for them. I too as a 'consumer' can atleast comment on anything down here. why not asking him politely to cover a topic.
      asking someone to create a video is just asking them to write a book on a subject. (un)fortunately i'm not a boomer. if i was, a few decades ago I would have asked him to write a book.
      I know books/or any written document is more effective but today unlike few decades ago there are myriads of these documents for a certain topic. which one i should start with? in your era this question probably had an easy answer. i give you an exapmle. go on and learn abou mutt email client by reading arch wiki...
      Have you thought about it, why you, as a boomer, came here to respond me, in a video that you could otherwise learn by reading a book/article? isn't it ironic?
      and one more thing, fyi, in my country there is no way that i can buy a book from a foreign country. i cannot buy anything from amazon or the like.
      yes unfortunately you too demonstrated the core difference between boomers and millenials like me.

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety

      @@reverseila4363 I got to the end of the fourth line and gave up reading any furher. Sorry you wasted your time writing it, maybe someone else will read it.
      I can only judge you on what I see you write here, and you still strike me as self-entitled and disrespectful. I understand the effort that many content creators go through to produce content here, I keep thinking about starting my own channel but know how time consuming creating good quality material is.
      You get this content **FREE OF CHARGE** (no, we are also not taking into account the wear on your trousers/pants whilst you're sat on your chair working on your computer either) and the first thing you respond with is "Yes, but I want you to make this and that and something else". That is self-entitlement and lack of respect in a nutshell.
      And that's all I have to say to you. The discussion is over, learn to have empathy with others, particularly with the hard work that they do, and stop being a "me me me".

    • @reverseila4363
      @reverseila4363 Před 2 lety

      @@terrydaktyllus1320 look who speaks about entitlement. nobody cares about me, and that's fine, but almost certainly you do care!
      go home boomer :)

  • @edmund3504
    @edmund3504 Před 2 lety +3

    I use SSH every day

  • @PaperBenni
    @PaperBenni Před 2 lety

    What is your take on the freenode situation?

  • @drishalballaney6590
    @drishalballaney6590 Před 2 lety

    hey DT, why not take a look at using something like VNC as well?

  • @sashaj0aoallerdingsinsasse815

    Good Video about ssh, I truely like your stuff. Btw whats this rafi-pass directory in your Home ~ ;-) ? take it easy && take care off your privacy, bye

    • @DistroTube
      @DistroTube  Před 2 lety +1

      rofi-pass is a rofi script that works with the pass command. I used it on the recent video about "pass."

    • @sashaj0aoallerdingsinsasse815
      @sashaj0aoallerdingsinsasse815 Před 2 lety

      @@DistroTube yes, okay. I just mean If publish a Video, maybe use a dummy environment, not a your personal one 😀☺️ I like, and I want to give you patreon or via PayPal 5,55

  • @killua_148
    @killua_148 Před 2 lety

    Off topic, how can I add the "took x seconds" to the terminal?

  • @bahathir_
    @bahathir_ Před 2 lety

    If we set password in ssh keys, we can use 'ssh-agent', wich create a shell after the pass phrase being entered. In the shell, every ssh related commads can be used without entering the pass phrase.
    Example:
    $ ssh-agent bash -l
    Thank you.

    • @bahathir_
      @bahathir_ Před 2 lety

      @Learn Linux
      If I am not wrong , dt had set the pass phrase while creating the keys.
      In that case, ssh-agent is very useful, without using other tools/programs.

  • @GeorgeSukFuk
    @GeorgeSukFuk Před 2 lety

    What's the point of the Chisel project on github? it is a tunnel and gives examples for doing ssh inside of a TCP tunnel, but i don't know why you would do that vs. something like a reverse-ssh tunnel

  • @ammaralhassan8508
    @ammaralhassan8508 Před 2 lety

    Hey Dr try Lunar vim is a nice one

  • @deliriumcode
    @deliriumcode Před 2 lety +2

    If I'm on a different distribution and there's another name for openssh - what will be the command helping me finding that / those packages?

    • @debianswami8204
      @debianswami8204 Před 2 lety +2

      well, what distro are you using? have you googled(used as a verb for search), install openssh server (YOUR DISTRO)??? The tools are GNU tools, so they kinda go from DIstro to Distro. You may need another command to restart your services, or to start or stop the ssh server, as these commands are for a system that has systemd....what init system does your Distro use?

    • @deliriumcode
      @deliriumcode Před 2 lety

      @@debianswami8204 yo, the question was more hipotetical one, was wondering how could I find let's say all the packages with "ssh" in their name?

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety +1

      @@deliriumcode It should always be called "openssh-[something]", there's no reason to call it anything else.

  • @Cutrexxx
    @Cutrexxx Před 2 lety

    does ssh use a tcp connection?

  • @AndersJackson
    @AndersJackson Před 2 lety

    I would have used the apps in ufw, and using limit with ssh (not on protocol that do many connections, like http)
    ufw limit app OpenSSH comment "Allow ssh to access this machine"
    As that lock out people that try to force attack at your machine. If awahi is installed, you could try
    ssh -X user@ubuntu-virt.local
    The -X allow you to tunnel X11 over the ssh.
    You also might want to use ssh-add to add the certificate to an certificate server for ssh.

  • @FallenStarFeatures
    @FallenStarFeatures Před rokem

    If I'm a beginner, what use would I have for all this Linux server mumbo jumbo?

  • @NimaqAlizadeh
    @NimaqAlizadeh Před rokem

    👌👌👌

  • @aspeakgaming3564
    @aspeakgaming3564 Před 2 lety

    Is the id number random or follow a rule ?

  • @3133788
    @3133788 Před 2 lety

    Hey DT, you have to tell about mosh too

    • @debianswami8204
      @debianswami8204 Před 2 lety

      Mosh is not very common. It is only 9 yrs old, while openssh is 20+ yrs old. In fact I do not know many ppl that use it at all.

    • @3133788
      @3133788 Před 2 lety

      @@debianswami8204 according to your logic, there is no need to explain anything to anything less than 20 years old? mosh is a very handy thing. For example that allows you to move around with your laptop without losing the remote session

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety

      @@3133788 I think you should explain why, when one content creator works very hard to make a very informative video on a particular topic that you get free of charge, that you then immediately demand he makes a video on something else.

    • @debianswami8204
      @debianswami8204 Před 2 lety

      ​@@3133788 while an interesting topic (mosh) I was just trying to emphasize the fact that it is NOT used that often in the real world.Yes it's there, and yes it can be used, but most people don't use it---so it's not a "must tell them" subject... YMMV

  • @tostoday
    @tostoday Před 2 lety +1

    Maybe call the host machine Deadbeefer :)

  • @lqlarry
    @lqlarry Před 2 lety +5

    No. you're not first

  • @miladvaziri3
    @miladvaziri3 Před 2 lety

    not good enough to like and not too bad to dislike, thanks for video

  • @bluesdog88
    @bluesdog88 Před 4 měsíci

    Interesting on Fedora 39 its sshd

  • @micaiahflores1592
    @micaiahflores1592 Před 2 lety

    thanks to this vid I was able to ssh into my pinebook pro from my pinephone but I cant do the inverse lmaoo?

  • @eritert
    @eritert Před 2 lety

    On an ubuntu 20 server vps i had to install vim. What da

  • @krylite5541
    @krylite5541 Před 2 lety

    10:50

  • @paarthjuneja3707
    @paarthjuneja3707 Před 2 lety

    Hey DT, how can I learn Elisp?

  • @nicolaliguori5965
    @nicolaliguori5965 Před 2 lety

    Dear DistroTube,
    May you make a video about z shell (zsh) and what are the differences with bash? I'm simply asking because as far as i've seen a new distro on the block, cutefishOS - based upon Manjaro - uses it
    sneak peek preview: czcams.com/video/xl1uAlYIb54/video.html
    Whatever, thaks :)

  • @rezmed1144
    @rezmed1144 Před 2 lety

    your eyes

  • @gflorin7761
    @gflorin7761 Před 11 měsíci

    dt's password: 我是

  • @WildVoltorb
    @WildVoltorb Před 2 lety

    Wuuuuut ubuntu, to tiling window manager eeeeeeeeeeew

  • @liftlinux9421
    @liftlinux9421 Před 2 lety

    So if you know the username, password & ip adress you can hack anyone, lol I am asking my one of my windows friends to tell me that stuff, do a rm -rf /* & go install Gentoo on that

  • @jumpman1823
    @jumpman1823 Před 2 lety +3

    All those anti-vaxxers from the last video might need to learn critical thinking skills to appreciate it this one.

    • @terrydaktyllus1320
      @terrydaktyllus1320 Před 2 lety +1

      Anti-vaxxers are just selfish and dumb. They should stick to Windows. You need a brain to think critically, they don't have one.

  • @Vlad-1986
    @Vlad-1986 Před 2 lety

    Who cares about SSH? SSH can't play ASCII star wars movies

  • @louis5555gmail
    @louis5555gmail Před 3 měsíci

    Since ssh is a major security risk, can I have my ssh server to be running only at a specific time of the week?