cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3809
Views
0
Helpful
1
Replies

SSH and telnet connection between SG300-28 and other devices

Jan Mierczi
Level 1
Level 1

Hello.

I'm configuring remote access to CLI for switch SG300-28. I have configured some features in Web interface. Currently is possible to connect to switch from PC trough telnet and SSH, from router (where this switch is connected) by telnet but NOT through SSH, why?

kronC881#ssh 192.168.20.251
[Connection to 192.168.20.251 aborted: error status 0]
kronC881#
*Oct 13 11:36:04.086: SSH CLIENT0: protocol version id is - SSH-2.0-OpenSSH_5.9p1.RL
*Oct 13 11:36:04.086: SSH CLIENT0: sent protocol version id SSH-1.99-Cisco-1.25
*Oct 13 11:36:04.086: SSH CLIENT0: protocol version exchange successful
*Oct 13 11:36:04.086: SSH2 CLIENT 0: send:packet of  length 344 (length also includes padlen of 5)
*Oct 13 11:36:04.086: SSH2 CLIENT 0: SSH2_MSG_KEXINIT sent
*Oct 13 11:36:04.098: SSH2 CLIENT 0: ssh_receive: 296 bytes received
*Oct 13 11:36:04.098: SSH2 CLIENT 0: input: total packet length of 296 bytes
*Oct 13 11:36:04.098: SSH2 CLIENT 0: partial packet length(block size)8 bytes,needed 288 bytes,maclen 0
*Oct 13 11:36:04.098: SSH2 CLIENT 0: input: padlength 11 bytes
*Oct 13 11:36:04.098: SSH2 CLIENT 0: SSH2_MSG_KEXINIT received
*Oct 13 11:36:04.098: SSH2 CLIENT 0: kex: server->client enc:aes128-cbc mac:hmac-sha1
*Oct 13 11:36:04.098: SSH2 CLIENT 0: kex: client->server enc:aes128-cbc mac:hmac-sha1
*Oct 13 11:36:04.098: SSH2 CLIENT 0: Using kex_algo = diffie-hellman-group-exchange-sha1
*Oct 13 11:36:04.098: SSH2 CLIENT 0: send:packet of  length 24 (length also includes padlen of 6)
*Oct 13 11:36:04.098: SSH2 CLIENT 0: SSH2_MSG_KEX_DH_GEX_REQUEST sent
*Oct 13 11:36:04.098: SSH2 CLIENT 0: Range sent- 1024  < 2048  < 4096
*Oct 13 11:36:04.194: SSH2 CLIENT 0: ssh_receive: 280 bytes received
*Oct 13 11:36:04.194: SSH2 CLIENT 0: input: total packet length of 280 bytes
*Oct 13 11:36:04.194: SSH2 CLIENT 0: partial packet length(block size)8 bytes,needed 272 bytes, maclen 0
*Oct 13 11:36:04.194: SSH2 CLIENT 0: input: padlength 8 bytes
*Oct 13 11:36:04.194: SSH2 CLIENT 0: SSH2_MSG_KEX_DH_GEX_GROUP received
*Oct 13 11:36:04.194: SSH2 CLIENT 0: Server has chosen 2056 -bit dh keys
*Oct 13 13:36:04: %SSH-3-INV_MOD: Invalid modulus length
*Oct 13 11:36:04.194: SSH CLIENT0: key exchange failure (code = 0)
*Oct 13 11:36:04.194: SSH CLIENT0: Session disconnected - error 0x00

 

<output ommited>
hostname switchba69eb
management access-list all-acess
permit
exit
aaa authentication enable Console enable
aaa authentication enable SSH radius enable
aaa authentication enable Telnet radius enable
aaa authentication login Console local
aaa authentication login SSH radius local
aaa authentication login Telnet radius local
line telnet
login authentication Telnet
enable authentication Telnet
password da39a3ee5e6b4b0d3255bfef95601890afd80709 encrypted
exit
line ssh
login authentication SSH
enable authentication SSH
password f66bc35de3a284d0aa7c0c81253db0e61d3a3183 encrypted
exit
line console
login authentication Console
enable authentication Console
password da39a3ee5e6b4b0d3255bfef95601890afd80709 encrypted
exit
passwords complexity min-length 0
passwords complexity min-classes 0
passwords complexity no-repeat 0
username compconf password encrypted 051386a419399719605601e62d7e1101bb805d8f privilege 15
username mhankus password encrypted bbc2cce17aa10a5c899174d39dfff1e187db3538 privilege 15
ip ssh server
ip ssh password-auth
ip ssh pubkey-auth auto-login
ip ssh-client username compconf
encrypted ip ssh-client password 5P7uzP6aezfibpSrK9fPaXm3bATIkpoEcuI1B4vqtSo=
ip ssh-client server authentication
snmp-server server
ip telnet server
!
interface vlan 1
 ip address 192.168.20.251 255.255.255.0
 no ip address dhcp
<output ommited>
exit
switchba69eb#


 

  1. What is wrong?
  2. How to configure telnet/ssh access to switch in CLI?



 

 

 

 

1 Reply 1

dylanvillarruel
Level 1
Level 1

Seems like the DH value is off.

 

Try:

ip ssh dh min size 2048

if that doesn't work, maybe regen the key.

 

crypto key zeroize

crypto key generate rsa general-keys modulus 2048

ip ssh server algorithm encryption aes256-ctr
ip ssh server algorithm mac hmac-sha1

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Switch products supported in this community
Cisco Business Product Family
  • CBS110
  • CBS220
  • CBS250
  • CBS350
Cisco Switching Product Family
  • 110
  • 200
  • 220
  • 250
  • 300
  • 350
  • 350X
  • 550X