Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
SSH server setup on nixOS and connecting into it
IT techni
Follow
6/9/2025
Category
🤖
Tech
Transcript
Display full video transcript
00:00
hello dudes i wanted to set up an ssh server on my newly created virtual machine of nexo s
00:10
i made this before and i wanted to make a better video
00:14
when it comes to the quality and everything okay so we should open the terminal
00:22
let's zoom in a little bit
00:24
yes i hope you can see it clearly we go to slash etc slash nexo s slash configuration dot nix our
00:36
default configuration file for our nexo s system password here since we're using
00:44
this with the root privileges and then we scroll down to
00:54
a block of code
01:04
known as programs dot gnu pg dot agent this whole block of code we uncommented
01:24
remember to uncomment from the first curly braces i mean starting from this line up to this line
01:39
and then we look for a line starting with service dot open ssh we look for it maybe anywhere in this
01:50
uh configuration file here it is services not service services dot open ssh dot enable and then
02:05
networking dot
02:09
this one this changed from my previous video so you need to be aware of it
02:15
it i always enable my firewall otherwise if you don't you don't need to do the steps of the firewall
02:24
and then this one i like to keep it true and and comment it to enable my firewall
02:34
uh i guess that's it for now for the configuration file which we're gonna come back to anytime soon
02:45
save
02:45
control x y enter it's gonna save it and then we run the command ssh dash key gen
02:58
enter here enter here enter again no passphrase all right the next step is taking the public key
03:13
which is stored here this should uh be given to you as you you can see here after generating the key
03:24
you should get yours i mean your system should generate it and tell you where it is stored the default one
03:35
should be slash home slash your username in my case i call it my username username uh slash dot ssh slash
03:44
and it should be like that enter we wanna see this public key so we can add it to our configuration file
03:56
where we were before uh this one i don't know if it's yeah that's it so this sounds like it's a different
04:10
type it's not like the one before it's shorter and uh i didn't wanna finish the path which is after
04:18
slash dot ssh because it may be different from a machine to another and i don't know maybe like they
04:25
decided to go with the new type of encryption and stuff we go back to our uh configuration file
04:33
and slash etc slash nix os slash configuration dot nix uh password scroll down to look for a piece of code
04:44
of the user itself you're gonna see it now
04:50
yes inside this piece of code we should type uh open ssh all in lower case auto
05:10
auto raised auto raised here k keys our key or key authorized key should be uppercase the key in our
05:27
authorized key dot keys
05:30
equals uh bracket uh double quotation mark and we paste our code or not code our public key here
05:46
and then we close the quotation mark and the bracket and semi-column let's uh double check it to see if it
05:55
is correct or not i guess it is so we have our authorized key as long as it is the correct syntax as i guess
06:08
authorized key dot keys yeah keys shouldn't be uppercase only key in the authorized keyword which is all one
06:19
one word should be uppercase i mean this one save ctrl x and then we get a confirmation you can save with ctrl s
06:28
and then leave with ctrl x here i just uh i prefer doing them both at once y and enter clear out the screen
06:38
and then we run sudo next os dash rebuild switch
06:53
here we apply the changes and then they should take effect after rebooting the system it's gonna have
06:59
an extra uh boot entry inside of our grab menu which should be the default one
07:08
it's like that in order for the user to revert back the changes
07:25
i guess we are having a little issue here
07:28
i guess uh both should be in plural form keys and keys authorized keys and keys which are like two
07:42
words one is uh associated with another here as i guess otherwise there may be another potential syntax for
07:51
this thing so here i should add s and then save and exit and try again
08:07
although this may not be the solution for this since the wiki tells something different
08:21
all right that was the correct syntax both authorized keys and the other keys should be in plural form so
08:39
please be aware of it don't make the same mistake
08:46
okay now it's time to reboot the system
08:51
for the changes to take effect
08:59
uh since i'm using a virtual machine here my network needs to be
09:14
in order for them to connect to all my uh devices that are outside of the virtual network that's made by
09:34
the hypervisor host bridged adapter here and then okay
09:46
you don't need to do that in case you aren't using a virtual machine
09:58
or write password here
10:13
let me make the
10:16
appearance better
10:20
never mind okay so now we should uh look for our ip address by typing ipa
10:26
I guess we need to I need to disconnect and then connect the network again devices and here
10:43
we should now check the IP address that's gonna be assigned by my router to this machine IPA and
10:55
we can see that we have 10.1.1.8 let's now run SSH username if I can type it correctly 10.1.1.8
11:12
yes password clear and then cat etc os release and we are connected through SSH to our NixOS machine
11:28
I guess that's it for this video please don't forget to subscribe like share and comment and see you
Recommended
5:13
|
Up next
Access/transfer files through ssh only through file explorer (sshfs/ftp server replacement)
IT techni
5/4/2025
2:36
ssh server on arch linux
IT techni
5/16/2025
0:50
How to connect SSH by Bitvise
Unlimited SMTP | Webmail | Mailer | RDP all ports
10/15/2016
8:52
Bypassing IDS Firewall using Meterpreter over SSH on Kali Linux
Penetration Testing with Kali Linux
11/17/2015
5:39
Failed to compile dosbox-x from the AUR, installed it from the chaotic AUR
IT techni
6/25/2025
7:00
Playonlinux setup on Arch Linux
IT techni
6/25/2025
11:00
Maxx interactive desktop setup on ubuntu
IT techni
6/18/2025
11:09
Maxx interactive desktop setup on debian Linux
IT techni
6/18/2025
19:00
Netctl (network management software) setup on Arch Linux
IT techni
6/14/2025
7:50
Why it is not possible (so far) to install proprietary nvidia drivers on alpine Linux
IT techni
6/9/2025
22:24
Sharing files with windows XP
IT techni
6/8/2025
15:16
Nixos (GUI) setup on virtualbox and installing xfce on it with telling some tricks
IT techni
6/3/2025
6:59
Alpine Linux upgrade to a major release
IT techni
6/1/2025
17:03
Ventoy setup on Arch Linux and making bootable USB flash drive
IT techni
5/29/2025
6:35
winfetch on Windows XP & getting bitsadmin on Windows XP
IT techni
5/28/2025
15:08
maxxDesktop setup on Arch Linux
IT techni
5/27/2025
4:04
Brave browser setup on Arch Linux
IT techni
5/27/2025
0:56
lsusb: command not found on arch linux
IT techni
5/16/2025
2:08
Verbose boot messages on arch linux
IT techni
5/16/2025
10:44
Dlauncher (setup on Arch Linux)
IT techni
5/14/2025
7:21
Ulauncher setup on Arch Linux
IT techni
5/14/2025
3:38
Windows XP remote desktop with a better quality (changing the client software)
IT techni
5/5/2025
5:44
Never experienced remote desktop connection on windows XP so here i try it with you
IT techni
5/5/2025
1:39
Restore minimize/maximize button on gnome
IT techni
5/4/2025
6:44
Skip windows xp activation legally
IT techni
4/24/2025