How Secure Shell Works (SSH) - Computerphile

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 ม.ค. 2019
  • Connecting via SSH to a remote machine is second nature to some, but how does it work? Dr Steve Bagley.
    Dr Mike Pound on Hashing (mentions padding but full video on padding is planned to follow): • SHA: Secure Hashing Al...
    / computerphile
    / computer_phile
    This video was filmed and edited by Sean Riley.
    Computer Science at the University of Nottingham: bit.ly/nottscomputer
    Computerphile is a sister project to Brady Haran's Numberphile. More at www.bradyharan.com

ความคิดเห็น • 394

  • @nicholas_scott
    @nicholas_scott 5 ปีที่แล้ว +697

    I remember back in 97, the university officially ended all support for non encrypted remote access, and we were all required to use SSH. Which worked fine. It also made for an excellent tunnelling tool when the same university tried blocking all access to P2P networks.

    • @ByteNishi
      @ByteNishi 5 ปีที่แล้ว +16

      @@Eeroke Teach me master

    • @BattousaiHBr
      @BattousaiHBr 5 ปีที่แล้ว +63

      "congratulations, you played yourself."

    • @napalm3899
      @napalm3899 4 ปีที่แล้ว +9

      Hoisted by their own petard.

    • @paulgupta2454
      @paulgupta2454 4 ปีที่แล้ว +36

      If they can't see it, they have plausible deniability. Bet their lawyers were happier with that

    • @josephsmock3679
      @josephsmock3679 3 ปีที่แล้ว

      No mate. They didn’t think that far ahead.

  • @dansmoothback9644
    @dansmoothback9644 5 ปีที่แล้ว +223

    Discovering SSH was a game changer for me after i started playing with linux. I discovered SSH forwarding and it blew my goddamn mind. It's been a life saver in a lot of situations and I'll never forget the professor that showed me how to use it.

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +19

      I still remember when I discovered that I with scp could from machine A copy a file from machine B to C.
      Also that it could copy between two accounts on the same machine. 😜

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +11

      Anyway, you should try emacs.
      Open the file "/ssh:user@machine:file" or "/scp:user@machine:'.
      Called Tramp mode. 😜

    • @FractalZero
      @FractalZero 3 ปีที่แล้ว +6

      @@AndersJackson As someone who is new to the linux game, that second sentence is quite an eye-opener. So much to learn.

    • @AndersJackson
      @AndersJackson 3 ปีที่แล้ว +2

      @@FractalZero Emacs is great, both in Linux, MacOSX, and MS Windows.
      You might want to look Up and use My configuration on GitLab to start from.
      There you have both OrgMode and Magit setup for use in Emacs. Firar is easy way to generator, PDF, HTML and other formats from same source. You can also mix in code, and extract it to files or executing and show result in documents.

    • @DontScareTheFish
      @DontScareTheFish 2 ปีที่แล้ว +1

      The biggest thing for me was when setting up control connections along with that. I was in an environment which had 2FA on the bastion hosts to get into the environment, but regular keys / passwords to the hosts behind.
      We'd have a session to the bastion host with top running (to keep the session open) then we could use chaining / multihops to go through the existing session on the bastion host to the hosts deeper in the network on subsequent connections during the day

  • @El_Grincho
    @El_Grincho 5 ปีที่แล้ว +444

    Can't imagine life without SSH.

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +22

      Been there, in 1989 there was no SSH, just telnet, and we was happy to have that. In 1982 there was not even connections outside the university. I still remember the first Macintosh (yes, THE one, after Lisa).

    • @lunasophia9002
      @lunasophia9002 5 ปีที่แล้ว +71

      Anders Jackson The internet wasn't (as) full of people actively trying to ruin your day 30 years ago. It's sadly a different place now.

    • @feschber
      @feschber 5 ปีที่แล้ว +5

      @@lunasophia9002 Its so sad what the internet has become ... so many years yet still we don't have any secure authentication method thats 100% reliable

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +24

      @@feschber we will never have 100% security, as security faults is either buggs in software, hardware or in specifikation.
      For instance, there are some interesting bugs in the SMS protocol compression. 😜

    • @bithon5242
      @bithon5242 5 ปีที่แล้ว +16

      Can't imagine life without PURE WATER

  • @ClarkPotter
    @ClarkPotter 3 ปีที่แล้ว +36

    Fantastic. You're the professor that true geeks want. You exhibit an approachable charm beneath the geekspeak that invites questions and deep exploration into topics.

  • @clearmenser
    @clearmenser 5 ปีที่แล้ว +929

    Please don't blur for security. It's still readable. Use solid colored bars, for the love of Turing.

    • @eadweard.
      @eadweard. 4 ปีที่แล้ว +36

      who cares

    • @lollllloro
      @lollllloro 4 ปีที่แล้ว +234

      @@eadweard. Probably the guy who wanted to prevent others from seeing it. Or maybe he's baiting people to attack the address. Ironically you cared enough about people caring about it to comment so you must be really invested in this xd.

    • @naturesinterface6663
      @naturesinterface6663 4 ปีที่แล้ว +55

      @@lollllloro who cares

    • @lollllloro
      @lollllloro 4 ปีที่แล้ว +26

      @@naturesinterface6663 I'm starting to think it might be your IP or something and now the script kiddies are pouring in. :( I'm sorry, man. I never wanted anyone attacking you, or anyone else. I merely suggested it might be an intentional choice. It's probably for the best if everyone just stops paying attention to this if it is, in fact, hurting somebody. Again, my apologies if I made your situation worse, that was never my intent.

    • @sethadkins546
      @sethadkins546 4 ปีที่แล้ว +57

      @@lollllloro who cares
      Sorry I didn't wanna break the chain

  • @C4CONFIDENCE
    @C4CONFIDENCE 26 วันที่ผ่านมา

    Just started exploring the world of SSH. I am coming back to this video with reviews on the learning and practice process.

  • @SunsetGraffiti
    @SunsetGraffiti วันที่ผ่านมา

    Despite looking like a 90s hacksploitation movie character, Dr. Bagley is the real deal

  • @mugglepower
    @mugglepower 9 หลายเดือนก่อน

    the casual focus fade in/out makes it looks like an office episode and its just priceless/.

  • @gwgux
    @gwgux 3 ปีที่แล้ว +4

    Kudos for taking it down to the packet level! Many videos don't do this!

  • @sharkbytefpv4326
    @sharkbytefpv4326 5 ปีที่แล้ว +3

    Would love to see a video about MOSH from you guys!
    Thanks, appreciate your work

  • @Jeremy-su3xy
    @Jeremy-su3xy 5 ปีที่แล้ว +17

    Nice tutorial. Thanks. Would talk more about the key exchange and establishing process you omitted for the purpose of this video at around 4:00?

  • @oafpolitics179
    @oafpolitics179 4 ปีที่แล้ว +6

    Thing I love about this video is the listing paper. I bet Nottingham still have boxes and boxes of that stuff floating around from the 80s.

  • @antoniodellaporta3433
    @antoniodellaporta3433 5 ปีที่แล้ว +9

    I think there's an error when talking about the packet format. The SSH2's specifications (RFC4253, section 6.3) states as follow: "When encryption is in effect, the packet length, padding length, payload, and padding fields of each packet MUST be encrypted with the given algorithm.". So the packet is all encrypted except the MAC field.
    Anyway great job as always with bringing such contents, thank you!

    • @berndeckenfels
      @berndeckenfels 4 หลายเดือนก่อน

      That’s what he said (but it’s not true for all elgorithms and Mac’s. Gcm ciphers don’t encrypt the length

  • @gabbysmith7579
    @gabbysmith7579 3 ปีที่แล้ว +1

    This was really helpful for me to better understand how it works and why we use it thanks.

  • @SandmanGeek
    @SandmanGeek 4 ปีที่แล้ว +1

    SSH is the way to go ... Nicely explained Doc.

  • @alexeicodes
    @alexeicodes 3 ปีที่แล้ว +1

    Your videos are amazing! Thanks you for your work pal!

  • @ZedaZ80
    @ZedaZ80 5 ปีที่แล้ว +8

    Thanks for the subtitles! The auto-generated ones can be pretty inconsistent.

  • @Kevin_KC0SHO
    @Kevin_KC0SHO 4 ปีที่แล้ว +2

    Great video, thanks for creating great content.

  • @paojek4806
    @paojek4806 ปีที่แล้ว +1

    I am using this tunnel, 24/7 in my PC and smartphone for over 3 years now. And I am happy

  • @mh972
    @mh972 4 ปีที่แล้ว +43

    SSH tunnels let me watch this video at work without "them" knowing...

  • @pullmfinger6149
    @pullmfinger6149 6 หลายเดือนก่อน

    Thank you for a simple and clear explanation.

  • @xokocodo
    @xokocodo 4 ปีที่แล้ว +14

    Small detail, but I don't think padding is there to increase the security of the encryption. It's generally just added so that the data matches the block size of the encryption algorithm.

    • @soyitiel
      @soyitiel 2 ปีที่แล้ว +4

      It's both. Padding is necessary because of block size, but instead of being just null bytes, it's random bytes which scramble the final hash even more, so it also reinforces security

  • @BlueyMcPhluey
    @BlueyMcPhluey 5 ปีที่แล้ว +54

    perfect timing, I'm taking a networking course right now and they do a terrible job of explaining SSH

  • @paulsander5433
    @paulsander5433 5 ปีที่แล้ว +4

    Have you considered doing an episode about BEEP (or BXXP)? This is a standard stream multiplexing protocol as described in RFC's 3080 and 308.

  • @SouravTechLabs
    @SouravTechLabs 5 ปีที่แล้ว +4

    Can you link those videos (thumbnail) after the main video in description?

  • @kade9527
    @kade9527 5 ปีที่แล้ว +77

    How does the other machine (server in your example) know the key to initially decrypt the packet? Do they use an asymmetric encryption handshake to establish the session key for the ssh to encrypt the payload and padding to be passed through the ssh? Love the vids too

    • @ZintomV1
      @ZintomV1 5 ปีที่แล้ว +23

      Yes, they do, as you can see in the video it states "offering public key".

    • @kade9527
      @kade9527 5 ปีที่แล้ว +9

      @@ZintomV1 oh yeah thank you, I didn't see that on first watch :)

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +2

      @@kade9527 try it self with a couple of "-v" switches and you learn a lot. ;-)

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +7

      They also do some MIM protection. That is they use certificates on both directions, so you can create a certificate to use when you login in.

    • @huckthatdish
      @huckthatdish 5 ปีที่แล้ว +15

      Depends on the implementation. I’ve used connections where the sysadmin has to manually add your public key into the target machines config so only people who possess a specific set of private keys can possibly access it. The only way to possibly get in is access to one of the machines involved since no other auth protocol is part of the process.

  • @MaxCoplan
    @MaxCoplan 4 ปีที่แล้ว +3

    How do you do the last thing mentioned in the video? Keep ssh connection alive after exiting shell?

  • @GameplayandTalk
    @GameplayandTalk 5 ปีที่แล้ว +1

    Great explanation, thanks!

  • @hundredvisionsguy
    @hundredvisionsguy 5 ปีที่แล้ว +4

    Thanks. This was informative. I have a question about channels. Do I understand correctly that it's the channel that deals with the "handshake" and private/public key encryption/decryption? Or is it something else?

  • @blueguy5588
    @blueguy5588 2 ปีที่แล้ว +3

    Steve is a Feynman-tier explainer, great vid.

  • @dream_emulator
    @dream_emulator 5 ปีที่แล้ว +1

    This channel rocks like SSH.

  • @chizzlemo3094
    @chizzlemo3094 2 ปีที่แล้ว +3

    What I don’t understand about this and all network encryption generally, is does the first packet have to send the decryption key? How can you send a decryption key without it being sniffed???

  • @vladislavkaras491
    @vladislavkaras491 9 หลายเดือนก่อน

    Thanks for the video!

  • @davidgillies620
    @davidgillies620 5 ปีที่แล้ว +11

    The first thing I do when setting up a new SSH server is to set PasswordAuthentication to no. Passwords are evil. It takes a few seconds to generate a key pair and add the public key portion to the authorized_keys file. It's amusing to see how rapidly script kiddies start banging on port 22 when you open it on your firewall (within a minute, usually) but they will try in vain if you are using public key access (I like ECDSA-521 and RSA with at least a 2048-bit modulus).

    • @art_faith
      @art_faith 2 ปีที่แล้ว

      + port knocking.

  • @voiceoftreason1760
    @voiceoftreason1760 5 ปีที่แล้ว +1

    which video explains the padding and random data in the packets? It would be nice if that could be added to the description.

  • @dietalkaa
    @dietalkaa 5 ปีที่แล้ว +6

    SSH is really good. It even allows to connect ethernet layer VPN so you can have layer 2 or layer 3 if you wish vpn really easily and every machine supports that.

    • @BattousaiHBr
      @BattousaiHBr 5 ปีที่แล้ว

      A VPN is not actually L2 by the way, some people call it L2.5.

    • @dietalkaa
      @dietalkaa 5 ปีที่แล้ว +1

      It's L2. MPLS is more like Layer 2.5 -.- don't miss lead @@BattousaiHBr

    • @BattousaiHBr
      @BattousaiHBr 5 ปีที่แล้ว +2

      @@dietalkaa a VPN runs on top of L3, so how can it possibly be L2?
      the VPN interface is for all intents and purposes a L2 interface, but it runs on top of the L3 stack rather than on top of L1 or even other L2.
      this is why VPN is often called L2.5, among other encapsulation or tunneling protocols.
      when talking about MPLS VPNs, it's technically possible to get L2 transmission if you run it through something like ATM, but i think the standard method is on top of the IP layer.

    • @dietalkaa
      @dietalkaa 5 ปีที่แล้ว

      @@BattousaiHBr yes I know. What's your point??? Wtf

    • @BattousaiHBr
      @BattousaiHBr 5 ปีที่แล้ว +2

      @@dietalkaa
      ?
      you called VPN a L2 connection when it isn't.

  • @ferroviaire79
    @ferroviaire79 5 ปีที่แล้ว

    What is that Adaptec box always present on your videos? :)

  • @vishalmishra3046
    @vishalmishra3046 4 ปีที่แล้ว +2

    Why are SSH and TLS(SSL) different protocols when either one could have been built on top of the other to achieve the same objective - e.g. plain-text HTTP over SSH tunnel or rsh/telnet over SSL (instead of tcp) socket ? Is either one more or less secure than the other ?

  • @fouzaialaa7962
    @fouzaialaa7962 5 ปีที่แล้ว +12

    how does the encryption work ?? do both machines agree on a key to encrypt and decrypt ?? or do they use an existing keys ?? how is it done exactly ??

    • @Cobalt985
      @Cobalt985 5 ปีที่แล้ว +2

      ググレかす

    • @classawarrior
      @classawarrior 5 ปีที่แล้ว +5

      Which encryption to use, and how to exchange keys, is something both machines "negotiate" based on what they each support.
      Basically, it's going to be some version of Diffie Hellman (there are Computerphile videos on that).
      Over time, less secure options can be phased out, and replaced with new ones, more-or-less like a "plugin", without needing to scrap the basic SSH system.

    • @boring7823
      @boring7823 5 ปีที่แล้ว

      The encryption works in a very similar fashion to a modern SSL connection. A session key is generated with a Diffie Hellman or ECDH (DH ensures that only you and your suitor know this key), The server has a public/private keypair to prove it's identity which your client confirms is the same as the last time you connected. Dr Steve authenticated to the server using a public/private keypair on the client (which was encrypted on his disk using a password) for which the server has the public key in it's authorized_keys file. All the data is encrypted, usually with AES (but it can be chacha20-poly1305 or others) and the MAC is normally SHA256 based (or the one built into chacha20-poly1305). The public keys can also be several algorithms; RSA, ED25519,etc or even keys linked to certificates.

    • @fouzaialaa7962
      @fouzaialaa7962 5 ปีที่แล้ว

      so if i intercept the negotiation phase or even decrypt the packets with all known encryption on ssh i can get the data ??? is the negotiation itself encrypted ?? and how do they send the keys at first ??? and are the keys secured ??

    • @classawarrior
      @classawarrior 5 ปีที่แล้ว +2

      @@fouzaialaa7962 There's a negotiation about which *method* to use for exchanging keys etc, but the exchange itself is secure. Look up Diffie Hellman for info on how keys can be established securely over an unsecured connection

  • @7becks
    @7becks 3 ปีที่แล้ว +2

    Can a single file (split into packets) be sent through multiple channels of communication?

  • @poer__jiyo3104
    @poer__jiyo3104 5 ปีที่แล้ว +2

    Thank you sir, good job 🍉

  • @mazspork969
    @mazspork969 2 ปีที่แล้ว +1

    All I want to know where you picked up that lovely, wide, green leporello (endless stationary) paper.

  • @Pedritox0953
    @Pedritox0953 5 ปีที่แล้ว +1

    EXCELLENT WORK!! well explained

  • @vishalmishra3046
    @vishalmishra3046 4 ปีที่แล้ว +3

    Note that it would be better to compress before encryption to get higher compression ratio, rather than the other ordering.

  • @ESTEBANTMAN
    @ESTEBANTMAN 5 ปีที่แล้ว

    Thanks for this videos!!

  • @gloverelaxis
    @gloverelaxis 4 ปีที่แล้ว +2

    please do a video on packet sniffing & the transport and network layers of TCP/IP!

  • @philippetrov4881
    @philippetrov4881 5 ปีที่แล้ว +1

    What if there is a weakness in the hashing algorithm for the message authentication code and you somehow figure out for example what the message cannot be? I know it's abstract and non-practical idea... but I guess the mac can be encrypted as well (why not?).

  • @tpobrienjr
    @tpobrienjr 5 หลายเดือนก่อน

    Thank you. With what you have said, I (almost) understand what I need.

  • @1sleepingleg
    @1sleepingleg 3 ปีที่แล้ว +16

    Thousands of dollars worth of equipment and homeboy busts out the green sharpie and some printer paper from 1985. I love TH-cam.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 4 ปีที่แล้ว +2

    3:18 Presumably there are additional checks somewhere to ensure the packet length is sane. Otherwise you could fiddle those first four bytes to some random bizarre values and cause mischief that way. Because remember the MAC at the end has to be found via the packet length, so you can’t verify that until you are sure of the packet length!

    • @rlamacraft
      @rlamacraft 4 ปีที่แล้ว

      Lawrence D’Oliveiro what kind of length values might cause mischievous behaviour? Are you thinking what if the receiver is susceptible to a buffer overflow, or something?

    • @kwakubiney5175
      @kwakubiney5175 ปีที่แล้ว

      @@rlamacraft No I think he means if the packet length is altered, the receiver will not know how far to read into the payload and might miss some packet data.

  • @juanxpeke
    @juanxpeke 2 ปีที่แล้ว +2

    can someone suggest me what to study in order to understand all the concepts related to de video?

  • @zxuiji
    @zxuiji 4 ปีที่แล้ว +1

    But how do you protect the initial agreement between the 2? If a hacker has already seen that initial agreement the encryption won't matter to xem and xey can just decrypt it based on that initial agreement.

  • @ylstorage7085
    @ylstorage7085 3 ปีที่แล้ว

    [question] what font is it @6:12? normal "a"s, clear distinction between O and 0, that's a keeper

  • @-dash
    @-dash 2 หลายเดือนก่อน

    So are the random bytes which get concatenated the functional equivalent of a cryptographic “salt”?
    Also, does the length field include the length of the padding as well as the data?

  • @reizhustenistdoof
    @reizhustenistdoof 5 ปีที่แล้ว +10

    That timing tho. I know some of my class mates got asked about exactly this yesterday in the oral exam.

  • @napukapu
    @napukapu ปีที่แล้ว

    The way you pronounced Tatu Ylönen made me burst a lung laughing

  • @RealityCheck6T9
    @RealityCheck6T9 4 ปีที่แล้ว

    Thanks, really enjoyed

  • @aaronschwartz-messing4701
    @aaronschwartz-messing4701 3 ปีที่แล้ว +1

    If the sniffer intercepts the initial messages that are used to establish the encryption that they will be using then it should be able to decrypt all of the packets correct? Why does this not appear to be a concern?

    • @gvaidya1
      @gvaidya1 3 ปีที่แล้ว

      I was thinking the same thing!

  • @susmitislam1910
    @susmitislam1910 3 ปีที่แล้ว +1

    What if someone sniffs during the time when the server and the client decide on the encryption protocol?

  • @swas33
    @swas33 2 ปีที่แล้ว +1

    How many reams of green-bar printer paper do you still have laying around?

  • @darylallen2485
    @darylallen2485 5 ปีที่แล้ว

    You mention X windows using an encrypted tcp connection to poet 6000. I've always known ssh to use a standard port 23. When did that become the standard?

    • @chocolate_squiggle
      @chocolate_squiggle 2 ปีที่แล้ว +1

      ssh uses port 22. The older unecrypted telnet protocol uses port 23.

    • @darylallen2485
      @darylallen2485 2 ปีที่แล้ว

      @@chocolate_squiggle you are correct. Only thing i can think of is i made a typo on my cell phone 2 years ago.

  • @scottfranco1962
    @scottfranco1962 2 ปีที่แล้ว

    Scribbling on greenbar... that takes me back.

  • @Steve-Richter
    @Steve-Richter 4 ปีที่แล้ว +2

    What prevents code on the local system from reading private keys and then using those keys to login to a remote systems?

    • @kornbread5359
      @kornbread5359 4 ปีที่แล้ว

      Steve Richter i assume you found answer by now but.. permissions. TempDisable root make unprivileged user and add user to sudoers group, is the way i did it.

  • @SupperBin
    @SupperBin 4 ปีที่แล้ว

    Is that an amiga 1000 in the background?

  • @ahmadatlam
    @ahmadatlam 5 ปีที่แล้ว +3

    I love this channel !! But I am wondering why in 2019 such an amazing computer science department has that much dot-matrix printer paper ?? What do you guys do with that printer ??

    • @x--.
      @x--. 5 ปีที่แล้ว

      It's a style choice for these videos, as for the reason the dept has it... if it ain't broke?

    • @napalm3899
      @napalm3899 4 ปีที่แล้ว +2

      They use it to trigger people in youtube comments.

  • @jdcb18
    @jdcb18 5 ปีที่แล้ว +97

    Do an rsync too please

    • @wedusk
      @wedusk 5 ปีที่แล้ว +6

      +1

    • @lawrencedoliveiro9104
      @lawrencedoliveiro9104 4 ปีที่แล้ว +1

      rsync is so cool. You know Andrew Tridgell developed it for his PhD thesis?

    • @bit2shift
      @bit2shift 4 ปีที่แล้ว +2

      rsync is literally a swiss army knife for copying/moving files around locally and between machines.

    • @josephgaviota
      @josephgaviota 3 ปีที่แล้ว

      I've used rdist for 30 years; but have heard rsync is better. Will need to try it out.

  • @justinjustin7224
    @justinjustin7224 5 ปีที่แล้ว

    Where is that video on gallois fields that was teased at the end of the last isbn video? I’ve just been sitting by hoping you’ll post the video soon, but now I’m starting to worry that there isn’t a video being made.

    • @Computerphile
      @Computerphile  5 ปีที่แล้ว +1

      It is planned but it hasn't been shot yet! >Sean

    • @justinjustin7224
      @justinjustin7224 5 ปีที่แล้ว

      Computerphile yay, thanks for the response! I shall wait patiently and keep my eye out for the video.

  • @Reddy19800
    @Reddy19800 5 ปีที่แล้ว

    simply super.

  • @modolief
    @modolief 5 ปีที่แล้ว +1

    Wow, I started watching this video, but only out of the corner of my eye, and I looked at the monitor on the desk and thought: "What is that huge black cube??" -- optical illusion

  • @JamesBos
    @JamesBos 5 ปีที่แล้ว +1

    When you say the padding is a random number of whatever, is this akin to a salt when encrypting passwords for example?

    • @JivanPal
      @JivanPal 5 ปีที่แล้ว +1

      It's more for the purpose of obfuscation, allowing the SSH packet length to be some fixed number, and thus not allowing an attacker to deduce anything useful about what the payload might be.
      *_EDIT:_* It does also act as a salt, since we can have equivalent payloads which, even if encrypted using a simple block cipher, result in different ciphertexts due to having different randomly generated padding.

  • @user-ln6bq1gc9t
    @user-ln6bq1gc9t 3 ปีที่แล้ว

    you people are awesome

  • @AP-dc1ks
    @AP-dc1ks 5 ปีที่แล้ว +2

    I only watched to correct Steve.
    3:34 Unless you select specific 3rd party or otherwise dubious algorithms, the packet length field is also encrypted. In particular, the demo algorithms at 6:00 do encrypt the packet lenght field.

  • @kingofsedang
    @kingofsedang 4 ปีที่แล้ว

    Can you connect to a Bulletin Board System using Secure Shell Protocol (SSH) instead of Telnet?

  • @goetzp
    @goetzp 5 ปีที่แล้ว +6

    Thus video misses the really interesting point how the encyption key is exchanged between the two sides in a secure way. It also doesn't mention how to ensure that the foreign host is the one it pretends to be.. The role of the files "known_hostx" and "authorized_keys". Maybe you could explain these in a follow up video ?

  • @danielcalle9700
    @danielcalle9700 4 ปีที่แล้ว

    Buenas, amigo el tema no conozco, trato entender, me puedes pasar esa snota, estudio. comandos en unix con ssh./ gracias

  • @umageddon
    @umageddon 4 ปีที่แล้ว +8

    i was hoping he would explain how a 3rd party cant sniff the establishing encryption 'rules' and thus be able to decrypt later data

    • @samyamaryal7231
      @samyamaryal7231 4 ปีที่แล้ว +7

      once a connection is established between a server and a client, "handshaking" is done to ensure that the connection has been made with the right computer. An asymmetric encryption is done between the computers to generate and transport keys for symmetric encryption. The symmetric keys are hence used to encrypt and decrypt data.
      Now what happens is, computer A generates two keys for asymmetric encryption : public and private. A public key is sent over to computer B which encrypts the symmetric key using the public key it recieved. Here, the public key can only encrypt and the private key can only decrypt data. The encrypted symmetric key is sent back to computer A, which decrypts it using its private key and generates the symmetric encryption key. This way, both computers have a symmetric key which can be used to encrypt/ decrypt the data sent and received over the connection.
      The 3rd party cannot sniff the encryption "rules" (or the symmetric key) because it has been encrypted by a public key before transmission, and can only be decrypted with a private key, which hasn't been sent over the network.

  • @Alexthebrokkie
    @Alexthebrokkie 4 ปีที่แล้ว

    Thank you !

  • @12345charliebrown
    @12345charliebrown 5 ปีที่แล้ว

    would'nt it be possible to pose as an ssh server during the handshake process?

    • @JeremyStreich
      @JeremyStreich 5 ปีที่แล้ว

      The first handshake, yes. The subsequent handshakes, however, compare the public key it just got and compares it to the key in its local store. If the two are different, SSH complains. That means you should always get the fingerprint through offline means before connecting to a new service over SSH.

  • @kylaxcry
    @kylaxcry 4 ปีที่แล้ว

    Is there any limitation for ssh or channel from a machine to vast amount of routers/switches? We can't make more than 60 SSH connection simulatneouly.

    • @BLABLABLA-kl8eq
      @BLABLABLA-kl8eq 4 ปีที่แล้ว

      What do you mean "we cant make".
      For example cisco switches can have only opened max 16 connections to single switch. But it doesnt mean that switch cant forward SSH packets to different devices.

    • @kylaxcry
      @kylaxcry 4 ปีที่แล้ว

      @@BLABLABLA-kl8eq when we establish 20 SSH cxns from a windows server to different routers/switches. We try to open new SSH cxns to different routers but new cxns holds or directly closed.

    • @BLABLABLA-kl8eq
      @BLABLABLA-kl8eq 4 ปีที่แล้ว

      @@kylaxcry Tahts interesting.
      What kind of ssh client are you using? at this point it soudns more like client limitation/configration.
      Did you try on different ssh client? like instead of putty try mremote ng? Or moba xterm?

    • @BLABLABLA-kl8eq
      @BLABLABLA-kl8eq 4 ปีที่แล้ว

      @@kylaxcry Just to be sure
      Lets say you have hosts A,B,C,D to which you want to crate ssh connections.
      After creating 20 connections (like 15 to host A and 5 to host B, you cant create new connection to any of other hosts ? Like host C?

    • @kylaxcry
      @kylaxcry 4 ปีที่แล้ว

      @@BLABLABLA-kl8eq We use openSSH with Python's Paramiko Library. Each SSH cxn we make is unique from one server to unique devices (only cisco, huawei routers). We only wait a second for creating a new cxn to a new device using asynchronous programming.

  • @dirik009
    @dirik009 3 ปีที่แล้ว

    Fun video. I have noticed something, when i minimise this video on yt app to bottom bar your shirt looks like static on a tv without signal. Anyone nows why is that?

  • @blorgon
    @blorgon 2 ปีที่แล้ว +1

    Where can I buy that shirt?

  • @mistercohaagen
    @mistercohaagen 5 ปีที่แล้ว +20

    How do you even have dot-matrix printer paper in 2019?

    • @Neumah
      @Neumah 5 ปีที่แล้ว +16

      Because they haven't use them for printing in ages so the stockpile never gets used up?

    • @mistercohaagen
      @mistercohaagen 5 ปีที่แล้ว +14

      @@Neumah Nah... My theory is frivolous use of time machine.

    • @Neumah
      @Neumah 5 ปีที่แล้ว +3

      @@mistercohaagen ...or that.

    • @mytech6779
      @mytech6779 5 ปีที่แล้ว +10

      Tractor feed is very robust for industrial applications. Common office printers are flimsy junk with unreliable pickup and feed leading to jams and lost prints when removed from the nice clean, low vibration, and air conditioned environment. In short, tractor feed paper is still produced and sold.

    • @Christophe_L
      @Christophe_L 5 ปีที่แล้ว

      It's still used a lot.

  • @patrickjones9474
    @patrickjones9474 2 ปีที่แล้ว

    Nice video

  • @tenminutetokyo2643
    @tenminutetokyo2643 3 ปีที่แล้ว

    Toast and Jam! I used to be tech lead on that product.

  • @l105669
    @l105669 5 ปีที่แล้ว +29

    The story how ssh got allocated port 22 is also abit interesting.

    • @Cobalt985
      @Cobalt985 5 ปีที่แล้ว +2

      Telnet is port 23?

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว +5

      Please tell so we can see if it worth investigate.

    • @damnmab
      @damnmab 5 ปีที่แล้ว +21

      There is no story. Port 22 was free. Developer wrote an email requesting it be reserved for ssh. Request was granted.

    • @AndersJackson
      @AndersJackson 5 ปีที่แล้ว

      @@damnmab as it should be then.
      Nothing that to look into.

    • @unlokia
      @unlokia 5 ปีที่แล้ว +1

      Is "abit" like "rabbit", only a bit shorter?

  • @automotiveprogramming
    @automotiveprogramming 5 ปีที่แล้ว

    YES

  • @GabrieleBonetti
    @GabrieleBonetti 5 ปีที่แล้ว

    why is padding encrypted given they would be equally random bytes before and after encryption?

  • @stephenholland6328
    @stephenholland6328 2 ปีที่แล้ว +3

    You should redo this video. You have only explained that ssh sends packets over a transport system. If you go to the level of packets then tell the reader about public private encryption. Then explain a remote shell. Finally explain how ssh can be used in a non-shell mechanism.

  • @shravan.shandilya
    @shravan.shandilya 5 ปีที่แล้ว

    Good video

  • @RasheedSAI
    @RasheedSAI 3 ปีที่แล้ว +1

    always have something to set-off the day with ///

  • @grainfrizz
    @grainfrizz 5 ปีที่แล้ว +1

    Petition for computerphile to do Unix commands History, Uses, Tips, and Tricks

  • @raghul1208
    @raghul1208 2 ปีที่แล้ว

    excellent

  • @MajSolo
    @MajSolo 4 ปีที่แล้ว +10

    he does not explain the most important thing ... the actual initial handshake and why that would be secure.
    if someone sniff the initial packets he should be able to see the key the sender and reciever agree to use,

    • @edwardstables5153
      @edwardstables5153 4 ปีที่แล้ว +2

      @The Zak Take a look into public/private key cryptography. You can publish your public key for all in the world to see (and indeed, you are doing so right now), and it is used to encrypt data being sent to you. But it can only be decrypted by your private key, which (hopefully) no one else has. There's some really really cool maths that goes into it.

  • @_aullik
    @_aullik 5 ปีที่แล้ว

    3:40 shouldn't the message authentication code be encrypted aswell?

    • @boring7823
      @boring7823 5 ปีที่แล้ว

      1) Because you don't want to spend CPU time decrypting a broken message.
      2) Because you want to expose as little code as possible to malicious packet.
      However, it's even better (and faster) if the encryption and MAC are the same algorithm like with chacha20-poly1305 or AES-GCM.

  • @baseradius3907
    @baseradius3907 5 ปีที่แล้ว +1

    I would've liked a bit more detail... but.. I guess.. that's really all there is to SSH :)

  • @pauljones5620
    @pauljones5620 2 ปีที่แล้ว +1

    Blimey, he's gangsta in front of a computer.

  • @laurendoe168
    @laurendoe168 5 ปีที่แล้ว +6

    Ok, I admit I'm ignorant... but you never once explained how it WORKS - ie, why is this secure and what prevents a packet sniffer from decrypting the packet the same way the intended server does it?

    • @Golgafrincham
      @Golgafrincham 5 ปีที่แล้ว

      Check other videos for public private key cryptography. It's about symmetric keys. It can be used both for encryption and verification of identity.

    • @eddymison3527
      @eddymison3527 4 ปีที่แล้ว

      because it sends encrypted data... it can be decrypted, yes, but better than plain text..

  • @Larstig81
    @Larstig81 5 ปีที่แล้ว +1

    I did this once for fun with Windows on my home computer which I connect from my computer at school. It was slow but it works. This was many years ago. I think it was with WinXP or Win2k.

  • @zyghom
    @zyghom 2 ปีที่แล้ว

    ssh is probably the most important tool (lower level type like)

  • @Derbauer
    @Derbauer 5 ปีที่แล้ว

    i still dont get it. is it like a browser vpn?