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
  • Process monitoring : ps Command ps → Current shell process status ps -e → All running processes ps aux → All in BSD style with details ps -ef → Running process with detai...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Vi Editor : Vi Editor Commands i → insert mode ESC → escape to command mode r → replace mode x → delete character dd → delete line yy → copy line p → paste v → v...
  • Disk usage, logging, shutdown, hostname : Disk and Memory Info df → disk partition info df -h → human-readable format du → size of file/directory free → memory info cat /proc/cpuinfo → CPU in...
  • Share folder (NFS and Samba) : NFS → Network File System Share folder NFS Server dnf install nfs-utils libnfsidmap systemctl enable rpcbind systemctl enable nfs-server ...


(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