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!
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
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;`
@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.
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?
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
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?
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.
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
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 !
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
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?
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
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
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.
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?
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!
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
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;`
@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.
is it necessary to create .ssh directory
Very nice explanation using robot analogy.
Thanks! Was struggling for the last hour to do this!! Worked now.
Thanks mate, came here for a simple ssh key and learnt the alias trick on mac! Awesome :)
Hi, thanks for the video, I needed to remind how this works, it is so simple now. Great video.
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?
This video is indeed very helpful to understand about ssh! Thank you :)
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
Awesome ... explanation is also too good
Everything was well explained. Thanks
NICE!
Id be too nervous to disable "PasswordAuthentication". What about adding "AllowUsers" and change LogLevel to "VERBOSE" as a alternative?
Your video helps me a lot. Thank you so much!
Thanks, well put together and informative!
sublime tutorial! bravo!
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?
Am I suppose to set up a web server before I do this? New at this. Thanks.
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.
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
Thanks. Good explanation.
Very good...TY... All the meat is there
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 !
Nice explanation. Thank you!
How would I add a second certificate/login? to the authorized_keys list on a separate line? thanks
Connor Scott you can always edit the file and put in a new line, you can very well use this across your systems network
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
awesome resource, thanks mate
Nice explanation!!
4:47 They're slashes, not dots.
Great video, thank you!
Props for using photoshop instead of a presentation software.
Great tutorial!
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?
Whatever I tried, didn't work s
ssh: Could not resolve hostname id_rsa.pub: nodename nor servname provided, or not known
6:10 What if i don't know my password????
i thought i knew but nothing seems to work
@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?
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.
it helped me a lot thank you
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
I still get Permission denied (publickey).
Failed to add identity(s), Please help fix this
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
is this Photoshop tutorial??
says connection refused. lost connection when i get to the part of the video 5:37
+ScotTish ✯ CSGO ✯ is root authorization and password-based auth allowed on server?
+Majou Nexian should be...
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.
+Majou Nexian thanks!
Very helpful!
Thanks a lot!!!
WoW!!! Excelleny tutorial
Muito bom, ótimo vídeo.
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?
The .ssh directory should be 700 not 755
What would 0 stand for?
my bad. you are correct
thanks
hi