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

2017年9月22日 星期五

SSH no matching host key type found. Their offer: ssh-dss , DH GEX group out of range

ssh -o HostKeyAlgorithms=ssh-dss -o KexAlgorithms=diffie-hellman-group1-sha1

ssh -v -o HostKeyAlgorithms=ssh-dss -o KexAlgorithms=diffie-hellman-group1-sha1

加 -v 可以看看中間在做什麼

http://www.itdadao.com/articles/c15a1454203p0.html
ssh在7.2版本时,有一个security增强,将minimum modulus size提高到了2048;我当时连的设备好像是1024,所以这是导致问题的因素。
很多网络设备,路由器资源接入的时候,由于秘钥长度不匹配或者ssh和ssl版本问题导致不能选择DH GEX group,因此不能选择modulus sizes。


2014年1月21日 星期二

AIX 安裝 SSH

參考 http://blogsendak.pixnet.net/blog/post/91171536-install-ssh-in-aix-5.3

到 這裡 https://www14.software.ibm.com/webapp/iwm/web/reg/pick.do?source=aixbp 下載

要下載 openSSH 跟 openSSL

下載的時候要注意 版本的搭配問題. (openSSH 與 openSSL 的版本搭配 還有各自對 AIX 版本的搭配) 

下載的檔案會是 tar.Z 檔 

用 uncompress 解開變成 .tar 檔

再各自建一個資料夾把 tar 檔丟進去 用 tar xvf 解

查看目前版本用 lslpp -l | grep ssl

先裝 OPENSSL 再裝 OPENSSH


smit install_latest
ACCEPT new license agreements "yes" 

安裝完看看服務在不在
lssrc -a | grep ssh
startsrc -s sshd 
stopsrc -s sshd

2012年4月19日 星期四

CentOS 6 ,SSH 使用 Public Key 登入

ssh-keygen -t dsa
產生  DSA key pair

id_dsa  ( Private Key )
id_dsa.pub  ( Public Key )

cd ~/.ssh
cat id_dsa.pub > authorized_keys
cat id_dsa.pub > authorized_keys2

** .ssh 本身的權限

chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys2

** 有 SELinux 的話
/sbin/restorecon -R -v /home/$ACCOUNT/.ssh

參見

下載  Private Key

-- XShell
import 進 Key Manager

-- Putty
使用 PUTTYGEN.EXE 匯入
再轉成 Putty 的格式

import -> private key
save private key -> 存成 Putty 能用的 ppk 格式
然後在 putty 中指定 ppk 位置


--------------
需要把 key 送去別台 server

ssh-copy-id -i ~/.ssh/id_dsa.pub USER@HOST

*這個 script 的方向是 送出去 而不是 拉過來
*預設是用 RSA Key . 所以 DSA Key 要自己用 -i 指定 key 位置
*預設走 port 22 , 如果有改 port 要改寫 Script
*CentOS 6 以後有這個指令可以用
---------------