Linux IP adress cannot be accessed via ssh command -
in linux server have 2 interfaces linux server can accessed via terminal typing
ssh username@ip1 or ssh username@ip2
every thing works fine until restarted server. access linux server via first ip address. checked ip configuration (here connected server via first ip address)nano etc/network/interfacesgives:
iface eth0 inet static address 192.168.1.13 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.253 # dns-* options implemented resolvconf package, if installed dns-nameservers 192.168.1.2 # secondary network interface allow-hotplug eth1 iface eth1 inet static address 192.168.1.14 netmask 255.255.255.255 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.253 dns-nameservers 192.168.2.2 ifconfig shows eth0 so, once typed nano /sys/class/net/eth1/operstatei discovered interface(second ip adress) down tried ifconfig eth1 192.168.1.14 netmask 255.255.255.255 up , restarted networking service , ifconfig shows interface , can accessed via terminal, access denied (permission denied, please try again) once tried ssh username@192.168.1.14what can in order able access servers via terminal ip address
- try ping second interface make sure there isn't wrong network itself
- make sure ssh daemon configured listen on both ports.
Comments
Post a Comment