Setting Up an SSH Key

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ย. 2024

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

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

    I've spent a few hours trying to get this to work and you've explained it really simply and guided me through the process in less than 15 mins. If only all the interweb was as clear as you Dan. many thanks!

  • @lpfagundeseai
    @lpfagundeseai 9 ปีที่แล้ว

    I was trying to access a beaglebone using ssh without password and it wasn't working. Following your video it worked. So thank you very much!!! You're awesome!! =D

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

    Here is the summary of steps:
    1. local: `ssh-keygen -t rsa -b 2048`
    2. local → host: copy `~/.ssh/id_rsa.pub` from local to `~/.ssh/authorized_keys` at host.
    3. host: `chmod 644 ~/.ssh/authorized_keys`
    4. host: `chmod 755 ~/.ssh`
    5. host: `chmod go-w ~/`
    6. local: `ssh @; cd ~; bash;`

  • @kamal-ahmed
    @kamal-ahmed 9 ปีที่แล้ว +4

    @Andy Neal: Open the terminal and type the following commands without quote
    1. "cd ~"
    2. "ls -la"
    if you do not see a ".ssh" directory in the list then use the following command to create one
    3. "mkdir .ssh"
    now type again
    4. "ls -la" and you should see .ssh folder is there and now you can store your ssh keys there following this video tutorial above :) I hope this helps you.

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

      is it necessary to create .ssh directory

  • @AriunboldG
    @AriunboldG 10 ปีที่แล้ว

    Very nice explanation using robot analogy.

  • @amitnehasharma
    @amitnehasharma 8 ปีที่แล้ว

    Thanks! Was struggling for the last hour to do this!! Worked now.

  • @garygoodger
    @garygoodger 8 ปีที่แล้ว

    Thanks mate, came here for a simple ssh key and learnt the alias trick on mac! Awesome :)

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

    Hi, thanks for the video, I needed to remind how this works, it is so simple now. Great video.

  • @piotrk.5255
    @piotrk.5255 6 ปีที่แล้ว

    Hi, Great video explains everything nice and clear. One thing wasn't sure about, why did you remove the passphrase from the Server, if the main intention was to put another layer of protection in case someone would gain access to id_rsa? Wouldn't it be better to keep the passphrase on?

  • @rahulgoyal3179
    @rahulgoyal3179 8 ปีที่แล้ว

    This video is indeed very helpful to understand about ssh! Thank you :)

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

    More detailed explanation about ssh directories in local machine and remote machine (e.g., authorized_keys, sshd). Also, the fact that in linux everything would be simpler

  • @ShahnawazSayyad
    @ShahnawazSayyad 8 ปีที่แล้ว

    Awesome ... explanation is also too good

  • @val990-x1x
    @val990-x1x 4 ปีที่แล้ว

    Everything was well explained. Thanks

  • @leeblack2103
    @leeblack2103 8 ปีที่แล้ว

    NICE!
    Id be too nervous to disable "PasswordAuthentication". What about adding "AllowUsers" and change LogLevel to "VERBOSE" as a alternative?

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

    Your video helps me a lot. Thank you so much!

  • @austinshea427
    @austinshea427 9 ปีที่แล้ว

    Thanks, well put together and informative!

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

    sublime tutorial! bravo!

  • @uhN0id
    @uhN0id 8 ปีที่แล้ว

    I followed this to the T and I still get prompted for a password. I ran the ssh command with -vv to see what was going on and it seems to try my RSA key but immediately continues on to try other keys and eventually falls back to asking for a password. What should I be looking into to correct this?

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

    Am I suppose to set up a web server before I do this? New at this. Thanks.

  • @andyneal8271
    @andyneal8271 9 ปีที่แล้ว

    I looked on my MAC OSX 10.6.8 & ssh is not listed.? Seen links to download but they no longer exist. Can it still be bone. Sorry i a bit slow watching & typing command lines.

  • @arecode3588
    @arecode3588 8 ปีที่แล้ว

    at around 5:40 when you set your ssh root@xxxx i did the same but when i wrote it gave me port:22 Connection timed out. What can i do to fix it? Also what username and host are you referring to if i may ask. Maybe that is also of relevance to my problem.Thank you in advance

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

    Thanks. Good explanation.

  • @robertspencer3553
    @robertspencer3553 6 ปีที่แล้ว

    Very good...TY... All the meat is there

  • @samvadidar
    @samvadidar 6 ปีที่แล้ว

    at 6:32 you write a password in which you can go to the home directory.
    I am trying to install linux code and I need to use ssh. I do not know which password do I need to type at this stage !

  • @JeffLowy
    @JeffLowy 8 ปีที่แล้ว

    Nice explanation. Thank you!

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

    How would I add a second certificate/login? to the authorized_keys list on a separate line? thanks

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

      Connor Scott you can always edit the file and put in a new line, you can very well use this across your systems network

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

    hello sir , just for testing purposes my software allows me to setup hosts on 1 server by using different hosts name and differnt ports and so what i mean is it would be as an example host0 on port 8000 and host1 on port 8001 and host2 on port8002 and host3 on port 8003 and so how do i insert the pub key to an auth key file on each host folder than are all on 1 server linux ununtu machine? or is it just done once on host0 machine in the home/user folder?
    i am not understandung this and if there is no solution then since my software does run ssh on actual differnet srvers with dirferent IP then i will follw your vid but for now since its in my docs that i can use diffenrt ports and host names and use only 1 server machine , thats what i am trying to do becuz my software has to use ssh passwrdless to function;
    Lisa

  • @der0keks
    @der0keks 8 ปีที่แล้ว

    awesome resource, thanks mate

  • @Anon-yy4ns
    @Anon-yy4ns 9 ปีที่แล้ว

    Nice explanation!!

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

    4:47 They're slashes, not dots.

  • @thebrforest
    @thebrforest 6 ปีที่แล้ว

    Great video, thank you!

  • @tjf4283
    @tjf4283 7 ปีที่แล้ว

    Props for using photoshop instead of a presentation software.

  • @Roman-kpax
    @Roman-kpax 7 ปีที่แล้ว

    Great tutorial!

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

    hello i am on an ubunut 18 on a vbox vm but when i do ls -la in my /home/myname directory i do NOT see a .ssh folder why?
    Lisa
    can anyone help me out or is it trivial and i just create it when i start the ssh process?

  • @LeonDavidz
    @LeonDavidz 7 ปีที่แล้ว

    Whatever I tried, didn't work s
    ssh: Could not resolve hostname id_rsa.pub: nodename nor servname provided, or not known

  • @Qwerty-qb7rz
    @Qwerty-qb7rz 8 ปีที่แล้ว

    6:10 What if i don't know my password????
    i thought i knew but nothing seems to work

  • @Omar-ml3lh
    @Omar-ml3lh 7 ปีที่แล้ว

    @6:17 you were talking about a password. You didn't enter anything. I heard two clicks and then another line appeared. What happened here?

    • @MichaelYinger_Beginner
      @MichaelYinger_Beginner 6 ปีที่แล้ว

      The password was taken but wasn't shown, and it was asked for twice to confirm that you didn't mistype it on the first input.

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

    it helped me a lot thank you

  • @DamienChan
    @DamienChan 8 ปีที่แล้ว

    Connection trouble !!! Unable to negotiate with " Xxx.xxIP " port 22: no matching host key type found. Their offer: ssh-dss. How to solve this on MacTermial. However I can able to login to that server with Mac Putty! Thanks-----------update! Issue solved thanks

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

    I still get Permission denied (publickey).

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

    Failed to add identity(s), Please help fix this

  • @ranyoyb7738
    @ranyoyb7738 9 ปีที่แล้ว

    hey Tuts+ Computer Skills thank you for video !
    i have traineeship in small company and they asked me to deny the root and allow five specific users!
    the situation is like this:
    there is 5 users: admin , B , C , D , E
    and all these five are enables to log in SSH , and each one have password, but the problem no one of them i can log in from the terminal ! only the root and the password for the root is soho'admin password' !
    how can i change that to deny the root from log in and enable the rest 5 users ?
    * i tired all the ways that i find in google and forums ... with allowusers ... no-password .. change port to 7722 / 9922 / 2222/ 1234 ...
    Thanks again,
    rzoyb

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

    is this Photoshop tutorial??

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

    says connection refused. lost connection when i get to the part of the video 5:37

    • @HECKAKYH-ADEKBATEH
      @HECKAKYH-ADEKBATEH 9 ปีที่แล้ว

      +ScotTish ✯ CSGO ✯ is root authorization and password-based auth allowed on server?

    • @GameCenterUTube
      @GameCenterUTube 9 ปีที่แล้ว

      +Majou Nexian should be...

    • @HECKAKYH-ADEKBATEH
      @HECKAKYH-ADEKBATEH 9 ปีที่แล้ว

      ScotTish ✯ CSGO ✯
      then "connection refused" basically means firewalling of your client by path to server. Check that port is open on server. Check that port is routed on router or create port forwarding. If you are on WAN check that your ISP is not blocking ssh - this causes "connection timed out" on server. Could also be incorrect port set on server (/etc/ssh/sshd_conf) or in case of systemd on server, check you are using daemon-activated startup and not socket activated (server is started after someone knocks on port), ie "sudo systemctl disable ssh.socket", "sudo systemctl enable ssh.service", "sudo systemctl daemon-reload".
      For socket activated, the port is specified in *ListenStream* (not ListenAddress) when you do "sudo systemctl edit ssh.socket" or "sudo cp /lib/systemd/system/ssh.socket /etc/systemd/system && sudo nano /etc/systemd/system/ssh.socket". The "ListenAddress" in sshd_conf is completely ignored, because its systemd listening to knocks then, not sshd.
      This info is all from ArchLinux wiki on sshd.

    • @GameCenterUTube
      @GameCenterUTube 9 ปีที่แล้ว

      +Majou Nexian thanks!

  • @aussiejobhunt
    @aussiejobhunt 8 ปีที่แล้ว

    Very helpful!

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

    Thanks a lot!!!

  • @happylucky5609
    @happylucky5609 7 ปีที่แล้ว

    WoW!!! Excelleny tutorial

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

    Muito bom, ótimo vídeo.

  • @samk5316
    @samk5316 8 ปีที่แล้ว

    When working with a scenario Computer A connecting to
    computer B.
    Case 1: COMPUTER B -----connecting--> to COMPUTER A
    So in computer A : User temp1 using ssh-keygen generated a key pair
    Id_rsa.pub and id_rsa .
    1)So this id_ rsa.pub key pair permits to enter into Computer A using putty
    running on computer B.
    2)Save *.pub copied on to your local computer B and giving to putty with IP
    address and key will gets connected to computer A.
    3)using SSH you can connect from computer B into computer A using *.pub
    file with necessary” SSH temp1@ipofcomputerA”
    -----------------------------------------------------------------
    correct me if i don't understand right : 4)The user temp1 on system COMPUTER A
    with UID and password when using SSH-KEYGEN it generates a key file and store
    it his home directory .
    5)User temp1 is in computer A but not in computer B. In here you can browse the
    filesystem of computer A running ssh on computer B. But file system of computer
    B cannot be viewed from computer A(am i right?).
    ---------------------------------------------------------------------------------------------------
    CASE2: If temp2 user in COMPUTER B. We needs to browse the filesystem of
    COMPUTER B
    6) In computer B User temp2 using ssh-keygen generated a key pair Id_rsa.pub
    and id_rsa .
    7) Transfer the file Id_rsa.pub into computer A
    8) Using ssh on COMPUTER A “ssh
    temp2@ipofcomputerB” connect to COMPUTER B and browse the file system
    9)Without two sided authentication you cannot browse both
    ways. With single way authentication you can browse only the computer you are
    connecting (Am I Right?)
    10)If temp3 user of COMPUTER A is using ssh-keygen and it’s generates certain keys in
    home directory of temp3 on computer A.
    So if there are “N” no of users does each “user-n” has to generate a ssh-keygen
    on their own and transfer the files to COMPUTER which he needs connection with
    ?
    11) Or temp3 user generated id_rsa.pub in general takes care of all “N” users in the COMPUTER to login in using
    SSH?
    Please let me know, I am a junior so kindly answer the
    question?

  • @kappy_prasad
    @kappy_prasad 9 ปีที่แล้ว

    The .ssh directory should be 700 not 755

    • @Brootahlizer
      @Brootahlizer 8 ปีที่แล้ว

      What would 0 stand for?

    • @kappy_prasad
      @kappy_prasad 8 ปีที่แล้ว

      my bad. you are correct

  • @mapesa1000
    @mapesa1000 7 ปีที่แล้ว

    thanks

  • @skumart6902
    @skumart6902 8 ปีที่แล้ว

    hi