Anpassen der Virtuellen Maschinen Netzwerk und Serveradministration: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
=Hostname=
=Hostname=
*hostnamectl set-hostname servername.it2XX.int
*hostnamectl set-hostname servername.it1XX.int


=Netzwerk=
=Netzwerk=
Zeile 17: Zeile 17:
auto enp0s3
auto enp0s3
iface enp0s3 inet static  
iface enp0s3 inet static  
  address 10.88.2XX.2/24
  address 10.88.1XX.2/24
  gateway 10.88.2XX.1
  gateway 10.88.1XX.1
</pre>
</pre>


=Namerserver=
=Namerserver=
*cat /etc/resolv.conf  
*cat /etc/resolv.conf  
  nameserver 10.88.2XX.21
  nameserver 10.88.1XX.21
  search it2XX.int
  search it1XX.int


=Hosts=
=Hosts=
*cat /etc/hosts
*cat /etc/hosts
  127.0.0.1 localhost
  127.0.0.1 localhost
  127.0.1.1 servername.it1XX.int ns
  127.0.1.1 servername.it1XX.int servername
   
   
  # The following lines are desirable for IPv6 capable hosts
  # The following lines are desirable for IPv6 capable hosts
Zeile 42: Zeile 42:
*vi ~/.ssh/config
*vi ~/.ssh/config
  Host servername
  Host servername
   Hostname 172.16.1XX.2
   Hostname IP Adresse
   ProxyJump kit@fw
   ProxyJump kit@fw
;PubKey Übertragung
;PubKey Übertragung
*ssh-copy-id dhcp
*ssh-copy-id servername
Danach könnt ihr euch mit '''ssh servername''' passswortlos einlogen
Danach könnt ihr euch mit '''ssh servername''' passswortlos einlogen

Version vom 25. Juni 2025, 09:01 Uhr

Hostname

  • hostnamectl set-hostname servername.it1XX.int

Netzwerk

  • cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s3
iface enp0s3 inet static 
 address 10.88.1XX.2/24
 gateway 10.88.1XX.1

Namerserver

  • cat /etc/resolv.conf
nameserver 10.88.1XX.21
search it1XX.int

Hosts

  • cat /etc/hosts
127.0.0.1	localhost
127.0.1.1	servername.it1XX.int servername

# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Reboot

  • systemctl reboot

JumpHost

Auf dem KIT Host anfügen
  • vi ~/.ssh/config
Host servername
 Hostname IP Adresse
 ProxyJump kit@fw
PubKey Übertragung
  • ssh-copy-id servername

Danach könnt ihr euch mit ssh servername passswortlos einlogen