Пікірлер
@NorbertdeRooy
@NorbertdeRooy 6 сағат бұрын
authorised_keys file if usually in the users home directory, but in large or audited environments it could also be on an external system (ldap, postgresql,...) so the user cannot change it by himself. This is usually so that when the key gets lost the server admin has to be notified and it's changed/revoked on all systems at the same time.
@NorbertdeRooy
@NorbertdeRooy 9 сағат бұрын
So, a few things (Yes I used -G many times before) But there is something you are misunderstanding. First of all `ssh -G` does not _connect _to the server, it prints what configuration it WOULD use if you would connect (try it, disconnect your machine from the network and type the command). Now since it is most likely default config your next command (ssh-keygen) will overwrite the ssh private key (highly likely causing you to lose connection with all your other servers)! e.g. if you setup your servers to block logging in with password (which you really should), you only have private key login, but you just overwrote that. Also please stop telling people to not password protect their private keys (ssh-keygen -N) ssh-copy-id is good to use, but as mentioned before is likely to not work anymore because you overwrote the old file and password login should be disabled.
@idjoooo
@idjoooo 11 сағат бұрын
anjir bang suka banget gw ama konten lu, ga ada link donate kah?
@aidengaming7401
@aidengaming7401 Күн бұрын
can you share the meme you showed at start? Geto brain opening meme
@Homeroe
@Homeroe Күн бұрын
Well, this was simple but pretty good. The youtube algorithm does it again
@lel7531
@lel7531 Күн бұрын
Damn your content goes hard, do you have a discord account by chance ?
@RunElevate
@RunElevate Күн бұрын
kinda like doom rooms
@ggsap
@ggsap Күн бұрын
Why use only nix when you can use bedrock's hijack to convert it into nix+any distro you like as many times
@karansmittal
@karansmittal 2 күн бұрын
gold
@user-mn6wv4iw6r
@user-mn6wv4iw6r 2 күн бұрын
If u already have ssh-config, what scenario you need to parse every parameter instead of using ssh-config to connect ssh
@ayehavgunne
@ayehavgunne 3 күн бұрын
I actually have used that. Very recently in fact. Still didn't help me though.
@HhddGufif
@HhddGufif 3 күн бұрын
Cool. But sounds like its going to cause OS dependant branching in code
@stewie410
@stewie410 3 күн бұрын
I'm not sure what we're trying to accomplish here, but there's a lot of improvements to the script that could be made; for consistency, readability & UX: - Basic -h or --help support isn't hard to implement, and can remind a user (yourself) how you're supposed to use the tool. - Probably worth checking if $1 is passed at all, before you try to use it. - Instead of `sed`'ing the path, you can use realpath -- assuming its available (and --canonicalize-missing if preferred) - An associative array can be used to store the output of `ssh -G`; then you don't need to manually strip out the parts you need, just use them directly. - If you'd still prefer to manually pull items out, at least use an indexed array & readarray/mapfile. Dunno how well YT's comment system will handle the formatting, but here's an example rewrite, without changing much: ``` #!/usr/bin/env bash show_help() { cat << EOF Apply ssh pubkey auth to specified ~/.ssh/config host USAGE: ${0##*/} [OPTIONS] NAME OPTIONS: -h, --help Show this help message EOF } real_path() { realpath --canonicalize-missing "${1}" } parse_config() { local key value while read -r key value; do config["${key}"]="${value}" done < <(ssh -G "${1}") } main() { if [[ "${1}" =~ -(h|-help) ]]; then show_help return 0 elif [[ -z "${1}" ]]; then printf 'No host specified ' >&2 return 1 fi local -A config parse_config "${1}" config['identityfile']="$(real_path "${config['identityfile']}")" ssh-keygen \ -t 'ed25519' \ -f "${config['identityfile']}" \ -qN "" ssh-copy-id \ -i "${config['identityfile']}.pub" \ "${config['user']}@${config['hostname']}" } main "${@}" ```
@qm3ster
@qm3ster 4 күн бұрын
What I need is QUIC 🥵
@harmanrzgarmuhammad6730
@harmanrzgarmuhammad6730 4 күн бұрын
This goes hard ngl
@LifeGeneralist
@LifeGeneralist 4 күн бұрын
ssh-copy-id?
@binaryparrot3352
@binaryparrot3352 4 күн бұрын
For a video with less than 1k views, I did not expect such quality content :)
@HuynhNguyenGiaBaoKCT
@HuynhNguyenGiaBaoKCT 4 күн бұрын
great video! May I know the theme ?
@MeghdipKarmakar
@MeghdipKarmakar 4 күн бұрын
bruh
@m.awadsyahid2392
@m.awadsyahid2392 4 күн бұрын
🤣🤣🤣 I can't stop laughing
@disnuprasad7836
@disnuprasad7836 4 күн бұрын
Subbed.
@DLL_C_DLL
@DLL_C_DLL 4 күн бұрын
I popped in here thinking it was a linux slander meme, but this is actually really good teaching content! Nice work!
@thespencerowen
@thespencerowen 5 күн бұрын
Best explanation ever
@khanra17
@khanra17 5 күн бұрын
Poorest explanation ever. Please stop and get some help. 🤮🤮🤮🤮
@ggsap
@ggsap 5 күн бұрын
0:29 he* not him
@azizemirkorkmaz2760
@azizemirkorkmaz2760 5 күн бұрын
More video like thiis. But don't neglect long videos. :)
@mc4ndr3
@mc4ndr3 5 күн бұрын
rsync, and the user likely knows the path to the file before connecting with -G.
@Link-channel
@Link-channel 5 күн бұрын
The video is great! (I don't understand why mention JavaScript to do something completely unrelated to browser frontend, i thought the terminal was the place for bash scripting, or C, or Go, but maybe that's the new normal thanks to nodejs i guess)
@Link-channel
@Link-channel 5 күн бұрын
You didn't mention CTRL+Z
@threepe0
@threepe0 6 күн бұрын
Or just use ssh-copy-id. This is basically a long way of doing just that
@agenttank
@agenttank 3 күн бұрын
he IS usimg ssh-copy-id... i am unsure what the guy in the videos is accomplishing
@threepe0
@threepe0 2 күн бұрын
@@agenttank oh yeah. Yeah, strange then. This seems like a Rube Goldberg machine but less useful or practical
@albert69Einstein
@albert69Einstein 6 күн бұрын
is their a way to force the system to assign PIDs from a set or range of values ?
@albert69Einstein
@albert69Einstein 6 күн бұрын
if not there should be. this way you could automate your tasks knowing what the PIDs will be.
@wisteela
@wisteela 6 күн бұрын
I don't know this existed.
@siuyutpang2335
@siuyutpang2335 6 күн бұрын
really appreciate it, I have never notice the capital g option in ssh, it's really useful for automatically generate key from ssh config file
@MarkHopewell
@MarkHopewell 7 күн бұрын
We have a very well known author here in the UK called Michael Rosen. You are his twin!
@alphamineron
@alphamineron 7 күн бұрын
The little diagram updating as you explained was one of the most straightforward and brilliant teaching techniques I’ve seen! The production quality of this channel is incredible! Thank you so much for your work
@engine_man
@engine_man 7 күн бұрын
Would like to hear of a good use case for this
@UKsystems
@UKsystems 7 күн бұрын
You might not think of one, but there will always be an instance where this will come in handy
@engine_man
@engine_man 7 күн бұрын
@@UKsystems yea I’m asking for one. lol
@marcarlotuico5449
@marcarlotuico5449 6 күн бұрын
IoT?
@UKsystems
@UKsystems 5 күн бұрын
@@marcarlotuico5449 definitely for things that don’t require a lot of security this would be very easy to implement
@youtube-is-cringe
@youtube-is-cringe 5 күн бұрын
Literally anything to do with devices Like idk, a machine/sensor in a factory that sends its state or whatever man
@Dom-De
@Dom-De 7 күн бұрын
Extra credit: read all hosts from known_hosts, check key access isn't *already* in place, and only generate / distribute as required....
@PS3PCDJ
@PS3PCDJ 7 күн бұрын
I would personally add a check to see if the specified identity file exists on the system, and only generate it, if it doesn't [ -a "$identityfile" ] || ssh-keygen -t ed25519 -f "$identityfile" -q -N "" instead of just ssh-keygen -t ed25519 -f "$identityfile" -q -N ""
@Youkouleleh
@Youkouleleh 8 күн бұрын
It's kinda annoying because the output of the background jobs are showing on the console
@Echiduna
@Echiduna 8 күн бұрын
good video!
@azertyuiop432
@azertyuiop432 8 күн бұрын
Great font, what it's called ?
@somebodyelse9130
@somebodyelse9130 8 күн бұрын
It looks like JetBrains Mono.
@nixhero
@nixhero 8 күн бұрын
Yes it's JetBrains Mono
@azertyuiop432
@azertyuiop432 7 күн бұрын
​@@nixheroThanks
@theepicguy6575
@theepicguy6575 8 күн бұрын
Lmaoo
@arjix8738
@arjix8738 8 күн бұрын
I actually use it often!
@ismbks
@ismbks 8 күн бұрын
all my Gs know this
@korigamik
@korigamik 9 күн бұрын
Nice! What do you use for the tts and for editing the video man?
@nixhero
@nixhero 9 күн бұрын
Elevenlabs tts, Krita, and CapCut
@chanpeter205
@chanpeter205 9 күн бұрын
good job, now I don't need to experience the process of "Never spend 6 minutes doing something by hand when you can spend 6 hours failing to automate it"
@minefacex
@minefacex 9 күн бұрын
Nix class video pull
@magnusmalmborn8665
@magnusmalmborn8665 9 күн бұрын
So, can you claim compensation fron the car insurance after a drive -by shooting?
@aureli4nus
@aureli4nus 10 күн бұрын
mythical video pull
@90hijacked
@90hijacked 10 күн бұрын
This is actually extremely useful, i literally have hundreds of servers in my config, proxycommand + openvpn3/openconnect ftw