Archive for the Linux Category

Get Linux Distribution Name and Version and Kernel Version

Linux Distribution Name and Version

cat /etc/*-release

or

lsb_release -a

 

Kernel Version

uname -a

or

uname -mrs

Get IP address of the client in an SSH session

echo $SSH_CLIENT | awk '{ print $1}'
echo $SSH_CONNECTION | awk '{ print $1}'
who am i | awk '{print $5}' | sed 's/[()]//g'

ddclient auf einer AWS EC2 instance

Installation von ddclient:

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y ddclient

Während der installation die Werte aus ddclient.conf eintragen.
Config File: /etc/ddclient.conf:

protocol=noip
use=web, web=http://169.254.169.254/latest/meta-data/public-ipv4
server=dynupdate.no-ip.com
login=<login>
password='password'
hostname.no-ip.org

ddclient Config /etc/default/ddclient

run_ipup="false"
run_daemon="true"

Und dann den Dienst neu starten.

sudo service ddclient restart