bloggerads

顯示具有 Others 標籤的文章。 顯示所有文章
顯示具有 Others 標籤的文章。 顯示所有文章

2015年12月24日 星期四

Check fingerprint of SSH public key (Linux command)

//
// Check SSH public key fingerprint
//
[root@martin Desktop]# ls /etc/ssh/*key*
/etc/ssh/ssh_host_ecdsa_key      /etc/ssh/ssh_host_ed25519_key.pub
/etc/ssh/ssh_host_ecdsa_key.pub  /etc/ssh/ssh_host_rsa_key
/etc/ssh/ssh_host_ed25519_key    /etc/ssh/ssh_host_rsa_key.pub

[root@martin Desktop]# ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub 
2048 99:d1:36:00:44:0a:cb:70:83:c8:21:76:c5:2a:d7:d9   (RSA)   // fingerprint

2015年12月22日 星期二

pscp (putty) : Transfer data between Windows / Linux

Step 1: Install putty, I use pscp command in putty in Windows side (client)


Step 2: Install openssh-server openssh-client in Linux side (server)

sudo apt-get install openssh-server openssh-client

Step 3: Demonstrate a example (The default path in Linux is Home)

# I am in windows (client), trying to copy file e:\MyFile.xxx from / to Linux(server)

My Linux configure --->  IP: 111.111.111.111, 
Admin_Name/Password: MartinLee/8888, 
file at Home/Documents/MyFile.xxx


2015年10月16日 星期五

UBUNTU 下的硬碟對拷方法

使用"dd"這個指令,將硬碟a完全複製到硬碟b
(Please prepare a ubuntu system to boot and use buit-in app "dd" to clone disk a, b, c,... to disk a, b, c,...)

1. find your disk by calling built-in app "Disks"  and find which disk is source and which one is destination

for example, my source disk is sdc, destination disk is sda


2. sudo dd if=/dev/sdc of=/dev/sda bs=200M


bs is very critical, although I type 200M, but actually average speed is around 100MB, if you dont give this parameter, the clone process might take very long time


3. wait then done.


<Note>
if you want to see the progress, open a new terminal and type: 

watch -n 5 killall -USR1 dd

Then the dd will start to show the progress every 5 seconds.

2015年5月8日 星期五

Git client 安裝和指令教學

1. 安裝Git軟體

使用Windows系統需先安裝Git這個軟體才能Access Git server,安裝好後在任意資料夾內點右鍵會看到這個Git的相關功能








2. 設定Git server

點Git Bash後會看到一個類似命令字元的視窗,key入ssh-keygen, 會生成兩個檔 (這兩個是一對的),將其放入c:\users\$username\.ssh\





這兩個檔案一個是public key (.pub), 一個是private key,到Git server下載code時會用這兩個檔案來檢查使用者的身分。

2014年5月29日 星期四

makefile example in windows

path
|
+--scr
|   +--a.txt
|   +--b.txt
|
+--dest


@IF EXIST "src" (
@ECHO src exist
)

REM set current path to variable
@set current=%cd%
@cd %current%/src

REM Don't show command in screen by add @
@

REM Show something
@ECHO Show Something..

REM Copy a a.txt from src folder to dest folder
cp src/a.txt dest

REM Copy all files from src folder to dest
cp -r src/* dest

REM Jum To Tag
@GOTO EXIT
:EXIT

REM create a new folder
mkdir NewFolder

2014年1月22日 星期三

Change Code::Blocks theme

1. 關閉 Code::Blocks

2. 到http://wiki.codeblocks.org/index.php?title=Syntax_highlighting_custom_colour_themes 將此網頁提供的XML檔案新增到本地,並複製成一個.config檔

3. 找到 Code::Blocks提供的執行檔 cb_share_config.exe, 填好以下的欄位點Transfer再點Save
  • Source configuration file:  填入step 2存的.config檔位置
  • Destination configuration file: 填入Code::Blocks預設.conf 路徑 (C:\Users\(Your_Name)\AppData\Roaming\CodeBlocks)