顯示具有 鳥哥的私房菜---學習筆記 標籤的文章。 顯示所有文章
顯示具有 鳥哥的私房菜---學習筆記 標籤的文章。 顯示所有文章

SCP---從工作站A抓工作站B的方法

2012年5月2日 星期三

scp - secure copy (remote file copy program)


scp 指令來透過一個安全且加密的連線在機器間傳輸檔案


在目前工作站A打已下指令


scp  [帳號]@[工作站B位置]:[想要抓的東西]


ex.


scp  doubleqq@140.xxx.xxx.xxx:/test


會出現是否接受認證


請打yes


接著打你工作站B密碼即可




-------------------------------------------------------------------------------------


以下為專業解釋
http://linux.about.com/od/commands/l/blcmdl1_scp.htm

NAME

scp - secure copy (remote file copy program)

SYNOPSIS

scp [-pqrvBC46 ] [-ssh_config ] [-program ] [-port ] [-cipher ] [-identity_file ] [-ossh_option ] [[user@ ] host1 : file1 ] [... ] [[user@ ] host2 : file2 ]



DESCRIPTION

scp copies files between hosts on a network. It uses ssh(1) for data transfer, and uses the same authentication and provides the same security as ssh(1). Unlike rcp(1), scp will ask for passwords or passphrases if they are needed for authentication.
Any file name may contain a host and user specification to indicate that the file is to be copied to/from that host. Copies between two remote hosts are permitted.
The options are as follows:
-c cipher
Selects the cipher to use for encrypting the data transfer. This option is directly passed to ssh(1).
-i identity_file
Selects the file from which the identity (private key) for RSA authentication is read. This option is directly passed to ssh(1).
-p
Preserves modification times, access times, and modes from the original file.
-r
Recursively copy entire directories.
-v
Verbose mode. Causes scp and ssh(1) to print debugging messages about their progress. This is helpful in debugging connection, authentication, and configuration problems.
-B
Selects batch mode (prevents asking for passwords or passphrases).
-q
Disables the progress meter.
-C
Compression enable. Passes the -C flag to ssh(1) to enable compression.
-F ssh_config
Specifies an alternative per-user configuration file for ssh This option is directly passed to ssh(1).
-P port
Specifies the port to connect to on the remote host. Note that this option is written with a capital `P' because -p is already reserved for preserving the times and modes of the file in rcp(1).
-S program
Name of program to use for the encrypted connection. The program must understandssh(1) options.
-o ssh_option
Can be used to pass options to ssh in the format used in ssh_config5. This is useful for specifying options for which there is no separate scp command-line flag. For example, forcing the use of protocol version 1 is specified using scp -oProtocol=1
-4
Forces scp to use IPv4 addresses only.
-6
Forces scp to use IPv6 addresses only.

SEE ALSO

rcp(1), sftp(1), ssh(1), ssh-add1, ssh-agent1, ssh-keygen1, ssh_config5, sshd(8)



Chapter 3

2011年7月8日 星期五
Note:以下解答僅供參考,主要想要讓自己多多練習

題目轉載自"鳥哥的 Linux 私房菜"http://linux.vbird.org/



Chapter 3習題

動動手實作題:


請分析你的家用電腦,以你的硬體配備來計算可能產生的耗電量,最終再以計算出來的總瓦數乘上你可能開機的時間, 以推估出一年你可能會花費多少錢在你的這部主機上面?

http://www.extreme.outervision.com/psucalculatorlite.jsp

以上的連結可以計算出你的電腦需要的瓦數

拿我的電腦為例:計算出來所需的瓦數為:350w

350(W) * 24(HR) * 365(Day)/1000*2.4925(每度電) = 7642.005(NT)

好驚人....

可以買一張新的顯卡了!!

為了節能省碳,沒在用就關機吧....

Chapter 2

Note:以下解答僅供參考,主要想要讓自己多多練習


題目轉載自"鳥哥的 Linux 私房菜"http://linux.vbird.org/

1.我的 Linux 系統上面老是出現問題,他有一個錯誤訊息為『fatal: SASL per-connection security setup』請幫我找出可能的原因為何?

answer: (參考來源:http://zhidao.baidu.com/question/168686307
# 上面的動作在建立 Makefile 囉!其中那個 -CCARGS 後面接的 -DUSE_SASL_AUHT
# -I/usr/local/cyrus-sasl2/include/sasl 其中 -I 後面的路徑就是 SASL2
# 函式庫所在的目錄喔!請依照您安裝的 sasl2 目錄所在而定!
[root@test postfix-2.0.4]# make
# 就是開始編譯啦!過程有點久喔!如果有出現任何 Error 時,
# 請將 error 仔細的查看一下吧!通常最大的原因都是一些
# include 檔案沒有安裝,也就是某些重要的套件沒有安裝之故,
# 例如 pcre.h 這個檔案就是一個例子囉!
# 解決的方法就是將該缺乏的套件安裝進去系統啦!
# 如果是 Red Hat 9 的話,可以這樣下達指令:
# make makefiles CCARGS="-DUSE_SASL_AUTH -I/usr/include/sasl" \
# AUXLIBS="-L/usr/lib/sasl2 -lsasl2"
# 因為 Red Hat 9 SASL2 路徑在 /usr/include/sasl ,這裏要特別的強調,
# 否則由於 Red Hed 9 同時提供 Cyrus SASL 1.5.x 以及 2.x.x 的版本,
# 可能會造成程式的誤判,那麼很可能會出現下列的錯誤喔:
# fatal: SASL per-connection security setup 
# 上面的錯誤訊息出現在 /var/log/maillog 中!


2.Windows的作業系統當中,老是自動出現一個名為internet optimizer的軟體,我想要知道他是什麼,可以怎麼找?


簡單說就是會綁架瀏覽器的首頁,並且轉向到奇怪的地方...

以下是wiki的說明

Internet Optimizer, also known as DyFuCA is a spyware program which redirects Internet Explorer error pages to advertising pages. When users follow a broken link or enter an erroneous URL, they see a page of advertisements. However, because password-protected Web sites (HTTP Basic authentication) use the same mechanism as HTTP errors, Internet Optimizer makes it impossible for the user to access password-protected sites.
It is classified as a "Browser Helper Object" or BHO, and as such, it loads whenever MS Internet Explorer starts and is not detected by firewalls or anti-virus software, as it is seen as a legitimate part of the application. It is also classified as a "downloader" which can download, install and run software on the victim's computer without their permission.


3.想一想再回答,為何您想要學習Linux?有沒有持續學習的動力?您想要Linux幫您達成什麼樣的工作目標?

answer: This question has no formal answer!!!

Chapter 1

Note:以下解答僅供參考,主要想要讓自己多多練習


題目轉載自"鳥哥的 Linux 私房菜"http://linux.vbird.org/

Chapter 1習題

動動手實作題:

1.請依據本章內容的說明,下載 Fedora 最新版本的 Live CD ,並將該 Live CD 燒錄成為光碟 (或 DVD) 後, 調整你的主機 BIOS 成為使用光碟機開機,在開機時放入剛剛燒錄的 Live CD ,使用該光碟機開機。在開機後你應該能夠進入系統。 請進入該系統,嘗試打開終端機、瀏覽器等,並嘗試操作一下該系統。由於該系統並不會影響到你的硬碟資料, 請儘量玩玩!

answer: Just try it!!

2.承上題,打開終端機並且輸入『 uname -r 』這個指令,出現的核心版本為何?是穩定還是發展中版本?

answer 核心版本為:2.6.35-22 奇數為發展中版本,偶數為穩定版本

3.請上網找出目前 Linux 核心的最新穩定版與發展中版本的版本號碼,請註明查詢的日期與版本的對應。

answer:最新穩定版:2.6.39.2  發展中版本:我找不到...

4.請上網找出 Linux 的吉祥物企鵝的名字,以及最原始的圖檔畫面。(提示:請前往 http://www.linux.org 查閱)

answer:Tux 

Chapter 0

2011年7月5日 星期二
Note:以下解答僅供參考,主要想要讓自己多多練習




題目轉載自"鳥哥的 Linux 私房菜"http://linux.vbird.org/

Chapter 0習題

動動手實作題:

1.假設你不知道你的主機內部的各項元件資料,請拆開你的主機機殼,並將內部所有的元件拆開,並且依序列出:
CPU的廠牌、型號、最高時脈;
主記憶體的容量、介面 (DDR/DDR II等);
顯示卡的介面 (AGP/PCIe/內建) 與容量
主機板的廠牌、南北橋的晶片型號、BIOS的廠牌、有無內建的網卡或音效卡等
硬碟的連接介面 (IDE/SATA等)、硬碟容量、轉速、緩衝記憶體容量等。
然後再將他組裝回去。注意,拆裝前務必先取得你主機板的說明書,因此你可能必須要上網查詢上述的各項資料。

ans:
CPU
廠牌:AMD
型號:Phenom II X6 1055T
最高時脈:2.8GHz(Turbo Core:3.3GHz)

Memory
容量:2048mb*2
介面:DDR2

VGA
ATI Radeon HD4200(內建)

MotherBoard
型號:GA-MA785GM-UD2H
南橋型號:AMD SB710
北橋型號:AMD 785G 
BIOS廠牌:技嘉專利DualBIOS
網卡:內建
音效卡:內建

Hard Disk
硬碟容量:640GB
連接介面:Sata2
轉速:7200rpm
緩衝記憶體容量:8mb

當初買回來自己組起來的,裝回去一樣沒問題!

2.利用軟體:假設你不想要拆開主機機殼,但想瞭解你的主機內部各元件的資訊時,該如何是好? 如果使用的是Windows作業系統,可使用CPU-Z(http://www.cpuid.com/cpuz.php)這套軟體,如果是Linux環境下,可以使用『cat /proc/cpuinfo』 及使用『lspci』來查閱各項元件的型號

ans:
Windows 利用Everest相關軟體來查看
Linux 利用『cat /proc/cpuinfo』or  『lspci』

3.依據文末的延伸閱讀連結,自行搜尋出 BIOS 的主要任務,以及目前在個人電腦上面常見的 BIOS 製造商有哪幾家?

ans:


(以上資料轉載自:http://zh.wikipedia.org/wiki/BIOS)