OpenSSH Server Setup in WSL

Поделиться
HTML-код
  • Опубликовано: 22 июл 2024
  • In this video, we learn how to set up the OpenSSH server in the Windows Subsystem for Linux (WSL).
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • НаукаНаука

Комментарии • 24

  • @costa2016
    @costa2016 Год назад +11

    I do recommend creating SSH keys using ED25519 algorithm instead of the default RSA. The former is safer, newer and shorter as well

  • @cezarycodes2192
    @cezarycodes2192 Год назад +1

    Your movies are very helpful BRO!

  • @KhalilYasser
    @KhalilYasser Год назад +3

    Thank you very much. I tried this `sudo ufw allow ssh` but got an error `ERROR: Couldn't determine iptables version`. I have installed it `sudo apt install iptables` but still got the same error.

  • @prashlovessamosa
    @prashlovessamosa Год назад

    Thanx man i want more on wsl btw you are the great teacher

  • @andreamodiano
    @andreamodiano 5 месяцев назад +1

    Excellent, thank you.

  • @facundolubo
    @facundolubo 8 месяцев назад

    I have two questions: a) How can u do the viceversa? I mean, connect from the WSL to Windows. I think that's not as easy. I've downloaded an ssh-server application and it supose to be running. At the same time, I try to configure Firewall. But I cannot connect.
    b) There is other way to share the keys? I mean, this example is easy to implement because access to the File System of each OS very quickly, but how if we pretend to connect from other device? We need to send the keys by email or with a pendrive?

  • @pll3586
    @pll3586 Год назад

    ur great and two precisions i stay 4 hours to say a problem and dont ask gpt yt is best : if u dont have systemctl its the good commande sudo service ssh status to say if ssh is open and sudo service ssh restart after the modification in the backup maybe and create a new authorized_keys with sudo nano authorized_keys and copy in the backup content after move with sudo cat backup

  • @TheBerni44444
    @TheBerni44444 Год назад +1

    hi, at "ssh-keygen -A" i get the error: "ssh-keygen: gnerating new host keys: DSA could not save your public key in ... : permission denied". What can I do about it?

  • @kasra7777
    @kasra7777 Год назад +1

    I am following this video step by step. Does anyone know why at 5:18 I get this error:
    cp: cannot create regular file '/home/kasra/.ssh/authorized_keys': No such file or directory

  • @danielniels22
    @danielniels22 Год назад

    will you make video about VPython?

  • @mateosabando
    @mateosabando Год назад +2

    Thank you for the video. Could you show us how to connect via the internet instead of through the local windows system?

    • @facundolubo
      @facundolubo 8 месяцев назад

      I think that u are connecting via internet, that's because is an ssh-client-server conexion.

  • @MaxMustermann-on2gd
    @MaxMustermann-on2gd Год назад +2

    How come the ls command available from your cmd.exe? Is it standard behavior? 😅

    • @Krbydav328
      @Krbydav328 Год назад

      It’s not there after you install WSL?

    • @MaxMustermann-on2gd
      @MaxMustermann-on2gd Год назад +1

      @@Krbydav328 if you are in your WSL terminal sure. But he was using ls from cmd.exe on windows. There is definitely no ls command available.

  • @rickgaine3476
    @rickgaine3476 4 месяца назад

    so, why did you copy the id_rsa.pub file from the .ssh directory to the desktop when you could ave just cd'dto the .ssh directory from /mnt/users/*/.ssh?

  • @kenjaev_hasan
    @kenjaev_hasan Год назад +1

    👍👍👍👍👍👍👍👍👏👏👏👏👏👏👏👏👏👏

  • @philtoa334
    @philtoa334 Год назад

    Thx_.

  • @pluto124
    @pluto124 4 месяца назад

    I’m confused why you are doing this. What’s the use case?

    • @byeebyte
      @byeebyte Месяц назад

      What he does in the video is that showing you how to connect to another device with using ssh-server. That means you can actually for example connect to your laptop or your friends laptop and use it remotely

  • @jojojojojojojo2
    @jojojojojojojo2 Год назад +2

    DO NOT override the existing KEY!!! I REPEAT DO NOT OVERRIDE THE EXISTING KEY!!! YO! What are you doing here?

  • @chromerims
    @chromerims 2 месяца назад

    Unfortunately, this is a deprecated method for ssh into WSL. Better to ssh into the Windows host but in a way that has system32's default shell configured to match the shell of your default distro in WSL2.
    Once you ssh into the Windows host, it requests a shell, the default shell. If that matches your default Linux distribution' shell in WSL2, then your default Linux also gets launched upon ssh into the Windows host. Cleaner and simpler. No need to repeatedly verify configs or run a script or job to fix port forward IP address, which is revised following a WSL shutdown. No need to configure firewall to open another port.
    Ssh to Windows' openssh-server, authenticate with Windows, Windows finds its system32 default shell, and if configured to match that of the WSL linux distro, then that distro gets launched, with Windows not WSL handling TCP traffic.
    Source: Scott Hanselman blog post dated August 4, 2020. Go there for more details and his clear instructions on a quick and easy setup.
    Nice video, nice channel 👍
    Kindest regards, friends and neighbours.