背景: ssh 為 secure shell 的縮寫,由ietf的網路小組(network working group)所制定;ssh 為建立在應用層基礎上的安全協議。ssh 是目前較可靠,專為遠端登入會話和其他網路服務提供安全性的協議。利用 ssh 協議可以有效防止遠端管理過程中的資訊洩露問題。ssh最初是unix系統上的乙個程式,後來又迅速擴充套件到其他操作平台。ssh在正確使用時可彌補網路中的漏洞。ssh客戶端適用於多種平台。幾乎所有unix平台—包括hp-ux、linux、aix、solaris、digital unix、irix,以及其他平台,都可執行ssh。
ssh 是乙個協議名稱,ssh 是實現該協議的程式
目的:
解決免密碼
解決:
1. ssh 工具生成 公鑰 id_rsa_pub(也可以其他演算法)
2. 將該公鑰 放到目的host上的.ssh/authrized_keys 上
3. bash 設定別名alias testportal=』ssh root@45.32.101.198』
注意:
1.put the public key in .ssh/authorized_keys2
2.change the permissions of .ssh to 700
3.change the permissions of .ssh/authorized_keys2 to 640.
4. cat .ssh/id_rsa.pub | ssh b@b 『cat >> .ssh/authorized_keys』 這條也是關鍵
不知為何
查閱:
登陸ssh指令碼
usr bin expect f set timeout 30 spawn ssh myname x.x.x.x expect password send r0iz9 o 9io p fi 1 r expect send projectname r send ssh test2 r interact...
ssh自動登陸
突然碰到有人問ssh再傳輸金鑰時候能不手動輸入密碼,由於沒有碰到過這種情況,所以查了一下發現可以用sshpass做到。sshpass 引數 ssh命令 引數 p password 將引數password作為密碼 f passwordfile 提取passwordfile的第一行作為密碼 e 將環境變...
ssh相關配置,ssh無密登陸 免登陸
yum install openssh server 安裝 service sshd start restart stop 啟動 chkconfig sshd on 設定開機執行 伺服器版本,一般都是預設開啟的 桌面版的,一般需要手動去配置 一般也預設安裝了 ssh是典型的 服務端和客戶端的互動模式...