sed extract text between markers

How do I extract config values from between BEGIN and END markers?

Try: sed -n '/BEGIN CERTIFICATE/,/END CERTIFICATE/p' /etc/ssl/certs/server.crt Info: sed -n suppresses automatic printing. The pattern '/START/,/END/p' prints all lines between two matching delimiters (inclusive). Examples: $ sed -n '/^\[database\]/,/^$/p' config.ini  # Extract section until empty line $ awk '/BEGIN/,/END/' file.txt  # Equivalent using awk $ sed -n '/ERROR/,+5p' logfile  # Print […]

Read More
Linux SSH Ed25519 key generation command in terminal

My SSH key uses old RSA. How do I switch to a modern strong algorithm?

Try: ssh-keygen -t ed25519 -a 100 -f ~/.ssh/id_ed25519 -C "linuxteck@ubuntu-2026" Info: Ed25519 provides faster, more secure keys than RSA. -a 100 increases KDF rounds to strengthen passphrase protection against offline brute-forcing. Examples: $ ssh-copy-id -i ~/.ssh/id_ed25519.pub user@server  # Copy public key to server $ ssh-keygen -y -f ~/.ssh/id_ed25519  # Print public […]

Read More