cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1426
Views
0
Helpful
10
Replies
soporteca
Beginner

ssh from cisco 4900 to linux

hi cisco gurus!

I'm having an issue trying to ssh from my 4900 to a linux pc.I can ping to the host, in fact the 4900 is de DG of the the network.

The thing is when I run an ssh I can't connect. It's not a firewall stuff. Any idea

switch4900m#ssh -v 2 -l mariano 192.168.4.17
% Connection timed out; remote host not responding

 

switch4900m#ping 192.168.4.17
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.4.17, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms

 

Thanks

Mariano

10 REPLIES 10
balaji.bandi
VIP Guru

If the Linux has SSH connection working and open to connect from outside.

 

Try below from your router. ( make sure you have enough vty line configured to send transport out)

 

ssh username@192.168.4.17

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Sorry, that command did not work for me

switch4900m#ssh -v 2 mariano@192.168.4.17
% Unknown command or computer name, or unable to find computer address

Have you got SSH enabled on your Linux box?  Can you SSH to it from other machines?

yes! It's enabled

Can you post the output  from switch

 

# show ip ssh

# telnet 192.168.4.17 22

 

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

switch4900m#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,aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
MAC Algorithms:hmac-sha1,hmac-sha1-96
Authentication timeout: 60 secs; Authentication retries: 5
Minimum expected Diffie Hellman key size : 1024 bits
IOS Keys in SECSH format(ssh-rsa, base64 encoded): ssh
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCXyFoXbOOHUob/Ktasg4tcdkrbWinnHlSOu2/wNKLK
P6H/wuIfOMnk9Fh0mP+BfVmZujG+HlTCeSkv1W58BxriHN7txrc7lp2Ae/rKM8Za8/pe6hxeRUaUUTFR
22z0EsmXAM4v8BvIvY39UeHtuRIQRDi4SgKR7Yg48JiiB/+eIw==
switch4900m#telnet 192.168.4.17 22
Trying 192.168.4.17, 22 ... Open
SSH-2.0-OpenSSH_8.1

just tried in my LAB here it works :

 

 

SW1#ssh -l root 10.10.9.9
Password:
Welcome to Ubuntu 16.10 (GNU/Linux 4.8.0-59-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

16 packages can be updated.
0 updates are security updates.

Your Ubuntu release is not supported anymore.
For upgrade information, please visit:
http://www.ubuntu.com/releaseendoflife

New release '18.04.3 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Mon Jan 6 20:52:53 2020 from 192.168.1.81
root@ES6:~# more /etc/os-release
NAME="Ubuntu"
VERSION="16.10 (Yakkety Yak)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.10"
VERSION_ID="16.10"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="http://www.ubuntu.com/legal/terms-and-policies/privacy-polic
y"
VERSION_CODENAME=yakkety
UBUNTU_CODENAME=yakkety
root@ES6:~#
root@ES6:~# exit
logout

[Connection to 10.10.9.9 closed by foreign host]

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

unfor, mine is not working :(

Any idea?

can you post-show version of your router, let me see if I can get a test on same version

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Cisco IOS Software, Catalyst 4500 L3 Switch Software (cat4500e-IPBASEK9-M), Version 15.2(4)E8, RELEASE SOFTWARE (fc3)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2019 by Cisco Systems, Inc.
Compiled Fri 15-Mar-19 16:30 by prod_rel_team

ROM: 12.2(44r)SG10
switch4900m uptime is 25 weeks, 6 days, 11 hours, 45 minutes
System returned to ROM by reload
System restarted at 20:54:19 ART Wed Jul 10 2019
System image file is "tftp://192.168.252.100/cat4500e-ipbasek9-mz.152-4.E8.bin"
Sushi Revision 11, Tatooine Revision 141, Forerunner Revision 1.83

Last reload reason: Reload command

 

This product contains cryptographic features and is subject to United
States and local country laws governing import, export, transfer and
use. Delivery of Cisco cryptographic products does not imply
third-party authority to import, export, distribute or use encryption.
Importers, exporters, distributors and users are responsible for
compliance with U.S. and local country laws. By using this product you
agree to comply with applicable laws and regulations. If you are unable
to comply with U.S. and local laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be found at:
http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email to
export@cisco.com.

cisco WS-C4900M (MPC8548) processor (revision 2) with 1048576K bytes of memory.
Processor board ID JAE17480CWP
MPC8548 CPU at 1.33GHz, Cisco Catalyst 4900M
Last reset from Reload
14 Virtual Ethernet interfaces
24 Gigabit Ethernet interfaces
24 Ten Gigabit Ethernet interfaces
511K bytes of non-volatile configuration memory.

Configuration register is 0x2102