Bonjour,
Après l’installation de Debian Weezy 3.0.4, je voudrais mettre une adresse ip fixe sur mon serveur.
Par défaut le fichier “/etc/network/interface” est configuré comme ceci :
[code]auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp[/code]
J’ai m’y ceci dans mon fichier “/etc/network/interface”
[code]auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
broadcast 192.168.0.255
gateway 192.168.0.254
auto eth1
iface eth1 inet dhcp[/code]
Puis j’ai redémarré le service réseau
[code]root@debian:~# /etc/init.d/networking restart
Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces … (warning).
Reconfiguring network interfaces…Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/f0:ad:4e:00:b2:43
Sending on LPF/eth1/f0:ad:4e:00:b2:43
Sending on Socket/fallback
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/f0:ad:4e:00:b2:43
Sending on LPF/eth1/f0:ad:4e:00:b2:43
Sending on Socket/fallback
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth1 to 255.255.255.255 port 67 interval 12
No DHCPOFFERS received.
No working leases in persistent database - sleeping.
done.
root@debian:~# [/code]
Et quand je me connecte en ssh sur la nouvelle adresse ip fixe 192.168.0.1 ça marche pas.
laurent@laurent-Bureau:~$ sshpass -p 'xxxxxx' ssh root@192.168.0.1
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
89:cd:d3:4a:50:bb:55:bf:43:b3:34:9d:50:90:19:a7.
Please contact your system administrator.
Add correct host key in /home/laurent/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/laurent/.ssh/known_hosts:1
remove with: ssh-keygen -f "/home/laurent/.ssh/known_hosts" -R 192.168.0.1
RSA host key for 192.168.0.1 has changed and you have requested strict checking.
Host key verification failed.
laurent@laurent-Bureau:~$
Et quand je me connecte sur l’ancienne adressse ip 192.168.1.1 ça marche
[code]laurent@laurent-Bureau:~$ sshpass -p ‘xxxxxx’ ssh root@192.168.1.1
Linux debian 3.0.4 #1 PREEMPT Tue Aug 30 19:56:02 MDT 2011 armv5tel
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Fri Jun 13 23:58:44 2014 from 192.168.1.140
root@debian:~# [/code]
Pourtant j’ai vérifié la configuration du réseau, l’ip est bien chargé ?
[code]root@debian:~# ifconfig eth0
eth0 Link encap:Ethernet HWaddr f0:ad:4e:00:b2:42
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::f2ad:4eff:fe00:b242/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:159 errors:0 dropped:0 overruns:0 frame:0
TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:23903 (23.3 KiB) TX bytes:22128 (21.6 KiB)
Interrupt:11
root@debian:~# ifconfig
eth0 Link encap:Ethernet HWaddr f0:ad:4e:00:b2:42
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::f2ad:4eff:fe00:b242/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:199 errors:0 dropped:0 overruns:0 frame:0
TX packets:201 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:30337 (29.6 KiB) TX bytes:27739 (27.0 KiB)
Interrupt:11
eth1 Link encap:Ethernet HWaddr f0:ad:4e:00:b2:43
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:15
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
uap0 Link encap:Ethernet HWaddr 00:24:23:45:0d:ac
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::224:23ff:fe45:dac/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:164 errors:0 dropped:0 overruns:0 frame:0
TX packets:85 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:20882 (20.3 KiB) TX bytes:10239 (9.9 KiB)
root@debian:~# [/code]
Pourquoi je n’arrive pas à me connecter en ssh sur 'ip 192.168.0.1 ?
Merci.