Lesson 05 - chad-p/wiki-linux-class GitHub Wiki

Services and Hardening

Services

# Service is SysV
server --status-all
service sshd status
service sshd start

# Systemctl
systemctl list-units
systemctl list-units --type service --state running
systemd-analyze blame

systemctl status sshd
systemctl start sshd
systemctl enable sshd
systemctl disable sshd
#Disable services for hardening

cat /usr/lib/systemd/system/sshd.service
systmctl cat sshd
systemctl daemon-reload
systemctl --no-pager show --property=UnitPath

Journalctl

# follow the ssh service
journalctl -u sshd -f

Protocols

SSH

  • Putty
  • Client configs - /ect/ssh/ssh_config, ~/.ssh/config
  • Server config - /etc/ssh/sshd_config
ssh user@hostname_or_ip
cd ~/.ssh
ssh-keygen
ssh-copy-id

SCP

FTP

SAMBA

[Files]: The name of the share  
comment = my files: Brief comment describing the share  
path = /home/<your user>: Absolute path to the share  
browsable = yes: If users can browse to the share  
read only = no: If users can write to the share  
guest ok = yes: If guests can access the share  
Save and exit the file.

NFS

SED

⚠️ **GitHub.com Fallback** ⚠️