From 4620a8ae3f058acf77956a1869ba137247a9261b Mon Sep 17 00:00:00 2001 From: TBS093A Date: Tue, 11 Apr 2023 21:03:30 +0200 Subject: [PATCH] feat: add install.zsh.sh file && sshd_config --- distro.guide/void.linux/README.md | 151 ++++++++++++++++++++++++++++++ install.zsh.sh | 6 ++ make.symlinks.sh | 4 +- sshd_config | 116 +++++++++++++++++++++++ 4 files changed, 276 insertions(+), 1 deletion(-) create mode 100644 distro.guide/void.linux/README.md create mode 100755 install.zsh.sh create mode 100644 sshd_config diff --git a/distro.guide/void.linux/README.md b/distro.guide/void.linux/README.md new file mode 100644 index 0000000..249aec6 --- /dev/null +++ b/distro.guide/void.linux/README.md @@ -0,0 +1,151 @@ +# Void Linux + +```bash + __.;=====;.__ @void.node.00 + _.=+==++=++=+=+===;. -------------------- + -=+++=+===+=+=+++++=_ OS: Void Linux x86_64 + . -=:`` `--==+=++==. Host: VirtualBox 1.2 + _vi, ` --+=++++: Kernel: 5.19.10_1 + .uvnvi. _._ -==+==+. Uptime: 13 mins + .vvnvnI` .;==|==;. :|=||=|. Packages: 181 (xbps-query) ++QmQQmpvvnv; _yYsyQQWUUQQQm #QmQ#:QQQWUV$QQm. Shell: zsh 5.9 + -QQWQWpvvowZ?.wQQQE== +``` + +update / upgrade: + +```bash +xbps-install -Syu +``` + +delete package: + +```bash +xbps-remove -of +``` + +#### Creating A Mirror + +https://docs.voidlinux.org/xbps/repositories/mirrors/index.html + +If you'd like to set up a mirror, and are confident you can keep it reasonably up-to-date, follow one of the many guides available for mirroring with rsync(1) (https://man.voidlinux.org/rsync.1), then submit a pull request to the void-docs (https://github.com/void-linux/void-docs) repository to add your mirror to the appropriate mirror table on this page. + +A full mirror requires around 1TB of storage. It is also possible to mirror only part of the repositories. Excluding debug packages is one way of decreasing the load on the Tier 1 mirrors, with low impact on users. + +Please keep in mind that we pay bandwidth for all data sent out from the Tier 1 mirrors. You can respect this by only mirroring if your use case for your mirror will offset the network throughput consumed by your mirror syncing. + +### Managing Services + +(https://docs.voidlinux.org/config/services/index.html#managing-services) + +basic usage of ```sv``` services manager: + +```bash +sv up +sv down +sv restart +sv status +``` + +The placeholder can be: + - Service names (service directory names) inside the /var/service/ directory. + - The full paths to the services. + + +for instance: + +```bash +sv status dhcpcd +sv status /var/service/* +``` + +#### Enabling Services + +Void Linux provides service directories for most daemons in /etc/sv/. + +To enable a service on a booted system, create a symlink to the service directory in /var/service/: + +```bash +ln -s /etc/sv/ /var/service/ +``` + +If the system is not currently running, the service can be linked directly into the default runsvdir: + +```bash +ln -s /etc/sv/ /etc/runit/runsvdir/default/ +``` + +This will automatically start the service. Once a service is linked it will always start on boot and restart if it stops, unless administratively downed. + +To prevent a service from starting at boot while allowing runit to manage it, create a file named down in its service directory: + +```bash +touch /etc/sv//down +``` + +The down file mechanism also makes it possible to disable services that are enabled by default, such as the agetty(8) (https://man.voidlinux.org/agetty.8) services for ttys 1 to 6. This way, package updates which affect these services (in this case, the runit-void package) won't re-enable them. + +#### Disabling Services + +To disable a service, remove the symlink from the running runsvdir: + +```bash +rm /var/service/ +``` + +Or, for example, from the default runsvdir, if either the specific runsvdir, or the system, is not currently running: + +```bash +rm /etc/runit/runsvdir/default/ +``` + +#### Testing Services + +To check if a service is working correctly when started by the service supervisor, run it once before fully enabling it: + +```bash +touch /etc/sv//down +ln -s /etc/sv/ /var/service/ +sv once +``` + +If everything works, remove the down file to enable the service. \ No newline at end of file diff --git a/install.zsh.sh b/install.zsh.sh new file mode 100755 index 0000000..f50b5cb --- /dev/null +++ b/install.zsh.sh @@ -0,0 +1,6 @@ +sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" + +git clone https://github.com/zsh-users/zsh-autosuggestions.git \ + $HOME/.oh-my-zsh/plugins/zsh-autosuggestions +git clone https://github.com/zsh-users/zsh-syntax-highlighting.git \ + $HOME/.oh-my-zsh/plugins/zsh-syntax-highlighting \ No newline at end of file diff --git a/make.symlinks.sh b/make.symlinks.sh index ce4d9a3..a289f91 100644 --- a/make.symlinks.sh +++ b/make.symlinks.sh @@ -6,4 +6,6 @@ ln -s $(pwd)/.zshrc ~/.zshrc ln -s $(pwd)/lambda-00x097.zsh-theme ~/.oh-my-zsh/themes/lambda-00x097.zsh-theme ln -s $(pwd)/welcome.sh /etc/updated-motd.d/welcome.sh -ln -s $(pwd)/welcome.sh /etc/profile.d/welcome.sh \ No newline at end of file +ln -s $(pwd)/welcome.sh /etc/profile.d/welcome.sh + +ln -s $(pwd)/sshd_config /etc/ssh/sshd_config \ No newline at end of file diff --git a/sshd_config b/sshd_config new file mode 100644 index 0000000..0a10806 --- /dev/null +++ b/sshd_config @@ -0,0 +1,116 @@ +# $OpenBSD: sshd_config,v 1.104 2021/07/02 05:11:21 dtucker Exp $ + +# This is the sshd server system-wide configuration file. See +# sshd_config(5) for more information. + +# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin + +# The strategy used for options in the default sshd_config shipped with +# OpenSSH is to specify options with their default value where +# possible, but leave them commented. Uncommented options override the +# default value. + +#Port 22 +#AddressFamily any +#ListenAddress 0.0.0.0 +#ListenAddress :: + +#HostKey /etc/ssh/ssh_host_rsa_key +#HostKey /etc/ssh/ssh_host_ecdsa_key +#HostKey /etc/ssh/ssh_host_ed25519_key + +# Ciphers and keying +#RekeyLimit default none + +# Logging +#SyslogFacility AUTH +#LogLevel INFO + +# Authentication: + +#LoginGraceTime 2m +PermitRootLogin yes +#StrictModes yes +#MaxAuthTries 6 +#MaxSessions 10 + +PubkeyAuthentication yes + +# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2 +# but this is overridden so installations will only check .ssh/authorized_keys +AuthorizedKeysFile .ssh/authorized_keys + +#AuthorizedPrincipalsFile none + +#AuthorizedKeysCommand none +#AuthorizedKeysCommandUser nobody + +# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts +#HostbasedAuthentication no +# Change to yes if you don't trust ~/.ssh/known_hosts for +# HostbasedAuthentication +#IgnoreUserKnownHosts no +# Don't read the user's ~/.rhosts and ~/.shosts files +#IgnoreRhosts yes + +# To disable tunneled clear text passwords, change to no here! +PasswordAuthentication no +#PermitEmptyPasswords no + +# Change to no to disable s/key passwords +KbdInteractiveAuthentication no + +# Kerberos options +#KerberosAuthentication no +#KerberosOrLocalPasswd yes +#KerberosTicketCleanup yes +#KerberosGetAFSToken no + +# GSSAPI options +#GSSAPIAuthentication no +#GSSAPICleanupCredentials yes + +# Set this to 'yes' to enable PAM authentication, account processing, +# and session processing. If this is enabled, PAM authentication will +# be allowed through the KbdInteractiveAuthentication and +# PasswordAuthentication. Depending on your PAM configuration, +# PAM authentication via KbdInteractiveAuthentication may bypass +# the setting of "PermitRootLogin without-password". +# If you just want the PAM account and session checks to run without +# PAM authentication, then enable this but set PasswordAuthentication +# and KbdInteractiveAuthentication to 'no'. +UsePAM yes + +#AllowAgentForwarding yes +#AllowTcpForwarding yes +#GatewayPorts no +#X11Forwarding no +#X11DisplayOffset 10 +#X11UseLocalhost yes +#PermitTTY yes +PrintMotd yes +#PrintLastLog yes +#TCPKeepAlive yes +#PermitUserEnvironment no +#Compression delayed +#ClientAliveInterval 0 +#ClientAliveCountMax 3 +#UseDNS no +#PidFile /run/sshd.pid +#MaxStartups 10:30:100 +#PermitTunnel no +#ChrootDirectory none +#VersionAddendum none + +# no default banner path +#Banner none + +# override default of no subsystems +Subsystem sftp /usr/libexec/sftp-server + +# Example of overriding settings on a per-user basis +#Match User anoncvs +# X11Forwarding no +# AllowTcpForwarding no +# PermitTTY no +# ForceCommand cvs server