1. Generate private/public keys
ssh-keygen -t rsa
2. Upload the public key (id_rsa.pub) to remote server
scp ~/.ssh/id_rsa.pub howard@remoteServer:~/.ssh/
or
cat ~/.ssh/id_rsa.pub | ssh howard@remoteServer "cat >> ~/.ssh/authorized_keys"
3. Login to remote server and append the key
ssh howard@remoteServer
mkdir .ssh
chmod 700 .ssh
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys
rm -rf id_rsa.pub
4. It's done!
To convert RSA private key to pem file, run the command below:
openssl rsa -in ~/.ssh/id_rsa -outform pem > id_rsa.pem
Wednesday, September 10, 2014
Thursday, July 31, 2014
NIC checksum offload enable/disable
To enable/disable NIC checksum offload:
[Windows]
. Go to Control panel -> Network and Internet -> Network and Sharing Center
. Click "Change adapter settings"
. Right click on the NIC and select "Properties"
. Click "Configure" -> Advanced tab
. You will find
. UDP Checksum Offload (IPv4)
. TCP Checksum Offload (IPv4)
. IPv4 Checksum Offload
. Enable/disable could be done there.
[Windows]
. Go to Control panel -> Network and Internet -> Network and Sharing Center
. Click "Change adapter settings"
. Right click on the NIC and select "Properties"
. Click "Configure" -> Advanced tab
. You will find
. UDP Checksum Offload (IPv4)
. TCP Checksum Offload (IPv4)
. IPv4 Checksum Offload
. Enable/disable could be done there.
Wednesday, July 30, 2014
Wireshark filter data in payload
. To filter packets with hex value "0xff 0x13" in payload
frame contains ff:13
frame contains ff:13
Thursday, July 17, 2014
Change console resolution for CentOS permanently
vi /etc/grub.conf
append "vga=791" without the quotes to the kernel line
append "vga=791" without the quotes to the kernel line
Thursday, July 3, 2014
vi/vim settings
/etc/virc for vi
/etc/vimrc for vim
~/.vimrc
syntax on
set autoindent
set sw=4
set tabstop=4
set cindent
/etc/vimrc for vim
~/.vimrc
syntax on
set autoindent
set number
set sw=4
set tabstop=4
set cindent
Sunday, June 22, 2014
Linux mount NAS with NFS type
showmount -e IPAddress
sudo mount -t nfs IPAddress:/ShareFolder /MountPoint
sudo mount -t nfs IPAddress:/ShareFolder /MountPoint
Convert Big5 and UTF-8
convmv: http://www.j3e.de/linux/convmv/
convmv -f big5 -t utf-8 -r --notest folder
-f: from
-t: to
-r: recursive
--notest: do it. If not added, it only tests it
convmv -f big5 -t utf-8 -r --notest folder
-f: from
-t: to
-r: recursive
--notest: do it. If not added, it only tests it
Subscribe to:
Posts (Atom)
Check clients which connect to Mac OS X Wi-Fi Internet Sharing
arp -i bridge100 -a bridge100 may be different on your Mac OSX
-
Date to Epoch time: (A1: Date cell) =(A1-25569)*86400 Epoch time to Date: (A1: Epoch time cell) =(A1/86400)+25569 PS. Need to format th...
-
1. Create an account on TestFlight ( http://testflightapp.com ) and with "Developer" option checked. 2. Log in to the TestFlight ...
-
[轉載] [Javascript] Encrypt your private blog post from the article of Kaie's Blog 今日在PPT上的Blog版逛到版友weijr所提到的一篇好文章,可以用來針對Blog中某一段文字給予加密,變成...