“ssh-keygen -R [host] “
helpful especially in clusters
“ssh-keygen -R [host] “
helpful especially in clusters
“sudo apt-get install macchanger”
“sudo macchanger -A eth0”
where “eth0” is the network card you’d like to change its MAC.
Note: You have to edit your connection in Network Manager and change the old MAC with the new one, or – which is much better in my opinion – just remove the MAC from there to be obtained dynamically.
The following script worked great:
#!/bin/bash
#random_computer_name
sudo sed -i 1,10d /etc/hostname
function randnum
{
number=$[ ( $RANDOM % 15 ) + 8 ]
}
randnum
function randpass
{
newhostname=`
}
randpass
(echo ‘0a’; echo $newhostname; echo ‘.’; echo ‘wq’) | sudo ed -s /etc/hostname
sudo /bin/hostname $newhostname
Just add the above script in a file and execute it with “sudo”.
To add this file to your startup scripts, just follow the instructions in this post
Source: here
“sudo hostname new_name“
where “new_name” is the new hostname you’ll use
“sudo ifconfig eth0 down” #bring down the network card
“sudo ifconfig eth0 inet hw ether xx:xx:xx:xx:xx:xx up” #change the MAC and bring it back up
where “eth0” is the network adapter you wish to change its MAC and “xx:xx:xx:xx:xx:xx” is the 6 groups of numbers each composed of two hexadecimal numbers.
For more info on MAC addresses, check this link and for the source, I got it from here, thanks to suki 🙂