Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

Ldap Secure Ssh/shaare/GVrFhw

  • linux
  • linux

Check on listening port

  • netstat -tunlp → check open/listening port

Securing SSH config

  • more /etc/ssh/sshd_config

    • change port 22
    • PermitRootLogin no

Enable SELinux (SE → Security Enhanced)

  • sestatus → check if active
  • cat /etc/sysconfig/selinux
  • stat myfile → extra context/access
  • chcon myfile → change context

OpenLDAP → to manage users from another server

  • dnf install openldap* → install everything
  • systemctl start slapd
  • systemctl enable slapd
  • ps -ef | grep slapd → check if running
  • cat /etc/openldap/slapd.d/ldap.conf
  • cat /etc/nsswitch.conf

    • replace passwd: files sss → ldap

Traceroute → trace network traffic

  • traceroute www.mywebsite.com

Secure SSH

Set idle timeout

  • nano /etc/ssh/sshd_config

    • ClientAliveInterval 600
    • ClientAliveCountMax 0

Disable root login

  • PermitRootLogin no
  • PermitEmptyPassword no
  • AllowUsers user1 user2
  • Port change: 22 → 22224 (not usable port)

Access remote server with SSH keys

  • For automation through script
  • ssh-keygen

    • leave default folder
    • no passphrase
    • key created
  • ssh-copy-id root@192.168.0.53

    • give password of 192.168.0.53
  • ssh root@192.168.0.53

    • no password needed!
8 months ago Permalink
cluster icon
  • NTP and Mail : NTP / Chronyd → Time Synchronisation nano /etc/chrony.conf → edit conf systemctl start chronyd systemctl enable chronyd chronyc → interactive cmd t...
  • System Run Level and Boot Process : System Run Level init 0 → shutdown init 1 → single user mode → troubleshoot init 6 → reboot the system init 2 → multiuser without networking init 3 →...
  • Podman and Docker : Containers → Podman Podman → manage pods and container images Buildah → building/pushing/signing container images Skopeo → copy/inspect/delete/signin...
  • Screen & Tmux : Screen (Terminal Multiplexer) Multi-terminal sessions in one window Alt+a | → split vertical Alt+a Shift+s → split horizontal Alt+a Tab → switch wind...
  • Systemctl, process management : Basic System Info Commands uptime → time now, up since, numbers of users, load average hostname → ip hostname uname -a → current OS and kernel info w...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community