How to SSH Without a Password (like a boss)

  Рет қаралды 68,476

Tony Teaches Tech

Tony Teaches Tech

3 жыл бұрын

Learn how setup passwordless SSH so you can login to a server without a password on Mac, Ubuntu, and other Linux systems.
Find more at tonyteaches.tech
Check out my vlog channel ‪@TonyFlorida‬
#ssh #passwordless

Пікірлер: 90
@hobgoblin4614
@hobgoblin4614 Жыл бұрын
Nice video. Instead of using the host a and host b text files, to distinguish between the two machines, you can run the hostname commands on each machine. Thanks for the great video!
@imad54321
@imad54321 Жыл бұрын
simplifies and to the point. well put together and delivered. Nice.
@biswadipdasgupta4204
@biswadipdasgupta4204 Жыл бұрын
Crystal-clear explanation! 👏👏
@vaishnav3735
@vaishnav3735 3 жыл бұрын
Congratulations on 7k
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Thank you so much 😀
@deangilbrough7339
@deangilbrough7339 8 ай бұрын
Exactly what I was looking for! Thanks!
@israelgatterer6821
@israelgatterer6821 Жыл бұрын
Hi Tony, in case of doing a script in geany how would you write a script that allows an individual person to communicate via ssh (sshpass) and execute nmap scans and geoip/whois queries?
@andymok7945
@andymok7945 Жыл бұрын
Nice video and informative. I am trying to to an rsync from my VM server over to my NAS. With root, I do not get prompted for a password. with any other user, I get prompted to enter a password. I tried the same for just doing ssh. Even if I have multiple keys in the authorized_keys file. What am I missing, thanks.
@MichaelSharpTechniSmart
@MichaelSharpTechniSmart Жыл бұрын
Tony, why didn't you need to edit the sshd_config file to uncomment and change lines to no? It still keeps prompting me for a password.
@fabiogarcia1431
@fabiogarcia1431 2 жыл бұрын
Your instructions are very clear. Thanks, dude. God bless you.
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Glad to help
@alhonaifi
@alhonaifi 2 жыл бұрын
Thank you, great presentation (techniques and info)
@Seansaighdeoir
@Seansaighdeoir 2 жыл бұрын
Very helpful video, many thanks!
@thenewone3944
@thenewone3944 Жыл бұрын
Really hope this reaches you, but will it still prompt for a password every time its changed? If the password use isn't disabled and expires and changes will they still have to receive it and enter it again?
@nikolcenalevski5164
@nikolcenalevski5164 2 жыл бұрын
this is so helpful , thank you for sharing!!!
@chenyao1144
@chenyao1144 29 күн бұрын
Thanks! It really helps!
@moustaphasd
@moustaphasd 2 жыл бұрын
How can I do that with a server local windows and virtual server Ubuntu on VMware workstation ?
@iambernardyanzon
@iambernardyanzon 3 жыл бұрын
Hi Tony, thanks for the amazing tutorial. It really helps especially for me as a beginner. I have a quick question about the password. What if you don't have the server password and I only have a private key. Can you use the private key to log in instead of the password directly? My user name and IP connect me to the server but it was asking for the password. When I tried to paste the private key it won't allow me it says invalid. Is it possible to use a private key instead without login in using your password?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
If that's the case, you can access the server like this: ssh -i your-private-key user@ip
@umakha
@umakha Жыл бұрын
Hola Tony. I do deeply appreciate your clear explanation about this important topic, but could you please let me know how we can connect to the remote server while the firewall in on, and we are not allowed to use port 22?
@Lydia13778
@Lydia13778 Жыл бұрын
you can change what port ssh used. if you are trying to run ssh without opening a port, any incoming data requires an open port however, this is true every application that accesses the internet.
@SHARK224
@SHARK224 Жыл бұрын
May I know I share the pub key to another host to logon the server with no password for another users?
@photogyulai
@photogyulai Жыл бұрын
Suggestion if the server still let you in with password after the above settings. In my sshd_config file there is a line `Include /etc/ssh/sshd_config.d/\*.conf` And inside this folder there were another .conf file with one line: `PasswordAuthentication yes` So, I had to modify the other configuration file as well.
@MukeshKumar-vv3wd
@MukeshKumar-vv3wd Жыл бұрын
good presentation, to the point and simple enough
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Glad you think so!
@kondwanikachoka1774
@kondwanikachoka1774 9 ай бұрын
When copying the pub key, you entered a password. Where did you get it assuming you don't know it for the remote server
@lualgomo3920
@lualgomo3920 3 жыл бұрын
Thank you. (Read until the end) I have 2 old computers in my house + 1 raspberry pi + 1 main computer. I use sshfs to create a network between them so I can have some sort of "mesh NAS", but it was very tedious to put the 12 keys each time I tuned on any device. One little problem. Any pc can now connect to any other PC without password, except for PC N°4. I need to input a password for (PC1) -> (PC4), (PC2) -> (PC4) and (PC3) -> (PC4). Any idea why?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Sorry Luis, I don't know why. I would need time on your network to determine
@Sluo1947
@Sluo1947 3 жыл бұрын
Thank you! If we are connecting to different servers do we generate different public keys for each server or the same one is used over and over?
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You can use the same public key for multiple servers
@20116802
@20116802 3 жыл бұрын
Thanks Tony!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
You bet!
@maxvanheuveln2829
@maxvanheuveln2829 2 жыл бұрын
I am getting a mkdir cannot create .ssh directory already exist error?
@S2eedGH
@S2eedGH 2 жыл бұрын
what about password-less connection from linux to windows
@chilioil7686
@chilioil7686 6 ай бұрын
at 4:25 , what exactly did you copy and entered exactly?
@verynice8736
@verynice8736 3 жыл бұрын
thank you Tony!
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
My pleasure!
@programming2347
@programming2347 9 ай бұрын
I need to do that but from a windows machine to an ubuntu machine, its been hours and I jus cannot solve it.
@thourayasboui376
@thourayasboui376 2 жыл бұрын
very useful !! thanks !!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@VANTYCSolutions
@VANTYCSolutions Жыл бұрын
Thank you my friend!
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
No problem
@Ignalvarez
@Ignalvarez 5 ай бұрын
great content
@danielajoycortez7591
@danielajoycortez7591 5 ай бұрын
Hi, I just wanna ask how did you know your root@ip's password?
@submarine.7seas
@submarine.7seas 9 ай бұрын
Thank You!
@israiqbal1414
@israiqbal1414 2 жыл бұрын
Hi there! At 2:09 you "pasted your password in and entered" but what if we do not know the password? What should we do instead?
@israiqbal1414
@israiqbal1414 2 жыл бұрын
also at 4:25 you "copied the password" but from where? I am sorry I am a beginner :"))
@muhammadfaizanasghar77
@muhammadfaizanasghar77 Жыл бұрын
@@israiqbal1414 I'm sure you've figured this out by now but I'm leaving this answer if anyone else get stuck on this. In the video he already knew the password and by your question it looked like you didn't know the password for your server. Well in this case one can use private key with the following command " ssh -i your-private-key user@ip "
@msx0406
@msx0406 2 жыл бұрын
short and easy to follow thx
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome!
@picnicsinspace198
@picnicsinspace198 2 жыл бұрын
Hey I was not able to find the ssh file. Am I supposed to download OpenSSH or does it only show once I have SSH'd to a destination. A bit confused and I'm sort of a noob
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
Perhaps if ssh isn’t installed, then you might need to install it but this typically comes preinstalled on most systems
@rorikrognarson9646
@rorikrognarson9646 Ай бұрын
How can you share this key if you don't have a password, or if you do have a password there is no reason to do so
@vishaalkumaranandan2894
@vishaalkumaranandan2894 Жыл бұрын
I just got the host key, no username,no password,What should I do now
@marcelltoth9737
@marcelltoth9737 Ай бұрын
Thanks a lot
@onewane3512
@onewane3512 9 ай бұрын
top of the tops
@rahulnagpal99
@rahulnagpal99 2 жыл бұрын
I have do the same thing many times but it is still asking me for the password...
@degstenk
@degstenk 5 ай бұрын
super!
@user-bx6vg7fo8e
@user-bx6vg7fo8e Жыл бұрын
great man, thanks
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
You're welcome!
@_Trakman
@_Trakman 3 жыл бұрын
this doesn't work, i'm trying it from a macbook (not a ubuntu or freebsd machine) using term can you try it and see if you can get it to work from a mac laptop as the host I think it requires editing the SSHD conf file on the mac - please try and see if you can get it working without using ubuntu - there probably will be different steps needed...
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
The sshd config file is only relevant on the server that you are sshing into. The "d" in sshd is for daemon and is referring to the background process that waits for incomming ssh connections. When you say that it doesn't work, what error message do you get?
@rustinpevehouse2831
@rustinpevehouse2831 2 жыл бұрын
Any tips on setting up passwordless SSH into a raspberry pi from windows (Visual Studio Code specifically)
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
If using Win 10 or above, the same steps should apply. Or are you using putty?
@rustinpevehouse2831
@rustinpevehouse2831 2 жыл бұрын
@@TonyTeachesTech I was using VSC on windows to connect to my pi but was having trouble with generating SSH keys. Ultimately I realized the keys were not being put into the .ssh folder, and after I moved them I was able to follow your steps with ease!
@georgichalakov6727
@georgichalakov6727 2 жыл бұрын
Thank you!
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
You're welcome
@ghassenbarkache1676
@ghassenbarkache1676 Жыл бұрын
password is needed in all cases
@1UniverseGames
@1UniverseGames 3 жыл бұрын
On password what did you paste, I didn't get this part actually.
@TonyTeachesTech
@TonyTeachesTech 3 жыл бұрын
Assuming you already have ssh access to a server, that's your user password
@moeinmollaee
@moeinmollaee Жыл бұрын
thanks man
@mohamedabdullah4223
@mohamedabdullah4223 Жыл бұрын
its still asking for my root password
@afshaarahmed2114
@afshaarahmed2114 Жыл бұрын
error publickey denied 1: public ip(given) 2: azure virtual machine any suggestion?
@aleksjagger9770
@aleksjagger9770 7 ай бұрын
Try to do a reload-ssh
@suhas7585
@suhas7585 2 жыл бұрын
thanks bro
@chuashanjing2261
@chuashanjing2261 Жыл бұрын
to copy the pub key to another server u still need the password...
@hajji384
@hajji384 Жыл бұрын
Still asks me a password
@timborg770
@timborg770 Жыл бұрын
Missleading title. You actually DO SSH to a server with password. Not possible to transfer your key to the server without having to first establish a password connection?
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
Yes I suppose you're right since you initially need the password for setup
@melanovapedia7924
@melanovapedia7924 Жыл бұрын
Thanks, you save my life and time jiahahah 🙏
@thenextbigthing1393
@thenextbigthing1393 Жыл бұрын
This is only for people who are too lazy to type the password right?
@TonyTeachesTech
@TonyTeachesTech Жыл бұрын
It's a more secure way to connect via SSH
@Nick-gj9gz
@Nick-gj9gz Жыл бұрын
Hi Tony, I tried this from a Mac to PC, but after I input the password (as 4:23 in this video), I got some error codes, and I still need password to ssh. Is there anything I missed?
@Nick-gj9gz
@Nick-gj9gz Жыл бұрын
could it be the path problem?
@keypo790
@keypo790 Жыл бұрын
HEll yeah
@TYLONsRoar
@TYLONsRoar 2 ай бұрын
👁👁 I sore you enter a password
@evosrayhan3938
@evosrayhan3938 2 жыл бұрын
Aajj
@TonyTeachesTech
@TonyTeachesTech 2 жыл бұрын
:)
How to Enable and Disable Root Login via SSH on Ubuntu
3:35
Tony Teaches Tech
Рет қаралды 24 М.
How SSH Works
8:54
Mental Outlaw
Рет қаралды 499 М.
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 12 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 103 МЛН
How to SSH Without a Password with Putty
6:41
Tony Teaches Tech
Рет қаралды 55 М.
OpenSSH is about to change. (For the better.)
10:00
Veronica Explains
Рет қаралды 139 М.
Password Hacking in Kali Linux
24:22
John Hammond
Рет қаралды 770 М.
Easy rsync Backup with tar and cron (daily, weekly, monthly)
22:14
Tony Teaches Tech
Рет қаралды 47 М.
OpenSSH for Absolute Beginners
23:00
Veronica Explains
Рет қаралды 101 М.
SSH Keys
10:12
RobEdwards
Рет қаралды 105 М.
I lost my kitten on the street😭 #cat #cats
0:32
Prince Tom
Рет қаралды 105 МЛН
БЕСТРАШНЫЙ ШКОЛЬНИК НА ВЕЛОСИПЕДЕ #shorts
0:11
Getting kids hooked on motorcycles not drugs 👏
0:18
Twinstunts
Рет қаралды 18 МЛН
Heartwarming moment as priest rescues ceremony with kindness #shorts
0:33
Fabiosa Best Lifehacks
Рет қаралды 36 МЛН