取消
显示结果 
搜索替代 
您的意思是: 
cancel
1253
查看次数
0
有帮助
0
回复

ルータからルータへ公開鍵認証でSSH接続したいです。

ikachan0052
Level 1
Level 1

ルータ(inserthostname_here)からルータ(RouterA)へ公開鍵認証でSSH接続できません。

PCからルータAへは公開鍵認証でSSH接続できました。

同じようにpubkey-chainでルータの公開鍵を登録したのですが、パスワードを求められてしまいます。

ルータの公開鍵はsh ip sshの結果に出ているものでいいのだろうと思っているのですが、、

 

どうやったらルータとルータで公開鍵認証でSSH接続ができるのでしょうか。

ご存じの方いらっしゃいましたら、教えていただけませんでしょうか。

 

 

それぞれの機器のsh runとsh ip sshは以下です。

(接続先)

RouterA#sh run

version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname RouterA
!
boot-start-marker
boot-end-marker
!
no aaa new-model
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
ip domain name test
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
username abc password 0 abc
!
redundancy
!
interface GigabitEthernet0/0
ip address 192.168.1.1 255.255.255.0
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip ssh version 2
ip ssh pubkey-chain
username rsa-user ←PCからこのユーザ名でログインできました。
key-hash ssh-rsa 5F9A37686D63A9EEAFF7D8082F899903
username iosv1 ←ルータからこのユーザ名だとパスワードを求められました。
key-hash ssh-rsa 0874A1779A578D4C866A0092B8D366A5
!
ipv6 ioam timestamp
!
control-plane
!

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

RouterA#sh ip ssh
SSH Enabled - version 2.0
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
KEX Algorithms:diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 2048 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): RouterA.test
ssh-rsa AAAAB3NzaC1yc2EAAAAD(中略)TQ96TnaIF5znq0Yk2Qhfh
RouterA#

 

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

 

(接続元)

inserthostname_here#sh run
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname inserthostname_here


boot-start-marker
boot-end-marker

no aaa new-model

mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180

ip domain name test
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
redundancy
!
interface GigabitEthernet0/0
ip address 192.168.1.2 255.255.255.0
duplex auto
speed auto
media-type rj45
!
ip forward-protocol nd
!
no ip http server
no ip http secure-server
ip ssh version 2
!
ipv6 ioam timestamp
!
control-plane

line con 0
line aux 0
line vty 0 4
login
transport input ssh
transport output ssh

 

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

 

inserthostname_here#sh ip ssh
SSH Enabled - version 2.0
Authentication methods:publickey,keyboard-interactive,password
Authentication Publickey Algorithms:x509v3-ssh-rsa,ssh-rsa
Hostkey Algorithms:x509v3-ssh-rsa,ssh-rsa
Encryption Algorithms:aes128-ctr,aes192-ctr,aes256-ctr
MAC Algorithms:hmac-sha2-256,hmac-sha2-512,hmac-sha1,hmac-sha1-96
KEX Algorithms:diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1
Authentication timeout: 120 secs; Authentication retries: 3
Minimum expected Diffie Hellman key size : 2048 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): inserthostname_here.test
ssh-rsa AAAAB3NzaC1yc(中略)379bdIRDvEPb8Ib ←この値をRouterAに登録しました
inserthostname_here#

0 条回复0