Networking notes

January 26, 2009 by V-Teq · 2 Comments
Filed under: Linux Notes 

How to change MAC (hardware) address of NIC (network interface card)

$ ifconfig eth0 down
$ ifconfig eth0 hw ether 00:ab:cd:ef:12:34 # new MAC address
$ ifconfig eth0 up
$ ifconfig eth0 | grep HWaddr # check new MAC address

Transfer files using Secure Copy (scp)

October 29, 2008 by V-Teq · 2 Comments
Filed under: Linux Notes 

Transfer file/directory from remote host to localhost:

$ scp [<USER>@]<HOST>:<REMOTE_PATH> <LOCAL_PATH>

Usage example:

$ scp v-teq@v-teq.com:~/.vimrc ~/.vimrc # copy .vimrc file from remote host to the local one
$ scp user@example.com:/etc/resolv.conf /tmp/dns.txt

Transfer file from localhost to remote host:

$ scp <file/directory> user@example.com:~/remote/directory

Transfer file/directory from localhost to remote host:

$ scp file.txt user@example.com:~/remote/directory