Supprimer Rendre public Rendre privé Add tags Delete tags
  Ajouter un tag   Annuler
  Supprimer le tag   Annuler
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Connexion

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 Permalien
cluster icon
  • Networking : Interface configuration files: /etc/nsswitch.conf → where resolve hostname to IP address /etc/hosts → add new IP to resolve /etc/resolv.conf → r...
  • Crontab / at : Crontab Basics crontab -e → edit crontab crontab -l → list crontab entries crontab -r → remove crontab entries systemctl status crond → check crond s...
  • Computer Storage / Disk Partition : Computer Storage Local → RAM / HDD / SSD DAS (Direct Attached Storage) USB HDD / DVD SAN (Storage Area Network) through iSCSI cable or fiber ...
  • 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...
  • Filesystem check and disk cloning : fsck & xfs_repair → filesystem check fsck → ext2, ext3, ext4 xfs_repair → xfs only Made each boot & fix it df -T → check Unmount before fsck ...


(110)
Filtrer par liens sans tag
Replier Replier tout Déplier Déplier tout Êtes-vous sûr de vouloir supprimer ce lien ? Êtes-vous sûr de vouloir supprimer ce tag ? Le gestionnaire de marque-pages personnel, minimaliste, et sans base de données par la communauté Shaarli