Useful commands
systemctl
journalctl
curl
Certificates
The Fingerprint of the http certificate can be obtained with the command:
The password for the http.p12 keystore can be obtained with:
/usr/share/elasticsearch/bin/elasticsearch-keystore show xpack.security.http.ssl.keystore.secure_password
for the transport.p12:
/usr/share/elasticsearch/bin/elasticsearch-keystore show xpack.security.transport.ssl.keystore.secure_password
nmcli
Device information
Individual changes
commit changes
Info
config is written to /etc/sysconfig/network-scripts/ifcfg-enps03
nmcli shell script
shell script to update network connection
#!/bin/bash
# Replace these values with your actual IP address, DNS, and connection method
#!/bin/bash
# Set your variables
connection_name="YourConnectionName"
new_ip_address="192.168.1.2"
new_dns="8.8.8.8"
new_method="manual"
# Check if NetworkManager is installed
if ! command -v nmcli &> /dev/null; then
echo "NetworkManager (nmcli) not found. Please install it."
exit 1
fi
# Check if the connection exists
if ! nmcli connection show --active | grep -q "$connection_name"; then
echo "Connection '$connection_name' not found or not active."
exit 1
fi
# Update the connection settings
nmcli connection modify "$connection_name" ipv4.address "$new_ip_address"
nmcli connection modify "$connection_name" ipv4.dns "$new_dns"
nmcli connection modify "$connection_name" ipv4.method "$new_method"
# Restart the connection for changes to take effect
nmcli connection down "$connection_name"
nmcli connection up "$connection_name"
echo "Connection '$connection_name' updated successfully."