09-01-2024 08:20 AM
Hi
We have 2 8300 series routers at a given location.
1. Router 1 -- ABC
2. Router 2 -- XYZ
When I ssh to router "ABC" using hostname it displays the prompt as -- "XYZ" >
When I check the running config in this scenario, the hostname mentioned shows "XYZ".
However , when i ssh to "ABC" using its ip address it displays the correct prompt -- "ABC" >
When I check the running config, the hostname displays "ABC" which is correct.
I wanted to understand the difference in behavior when trying to ssh using Hostname vs when ssh using IP address
09-01-2024 08:28 AM - edited 09-01-2024 08:39 AM
check below
MHM
09-01-2024 08:32 AM
Sorry @MHM Cisco World , could you please explain what you meant?
09-01-2024 08:38 AM
how you can access to router via SSH ? you need password, how you dd this password in router ?
MHM
09-01-2024 08:42 AM
yes, i do enter the password in both scenarios, i.e. when I ssh to the router using hostname and also when i ssh to the router using IP address.
09-01-2024 08:44 AM
this password config in router under ""line vty"" or via ""username xxx password xxx""?
MHM
09-01-2024 08:52 AM
I dont see any ""username xxx password xxx"" config...There is password info mentioned under "line vty" config as follows
line vty 0 4
access-class vty_access_in in vrf-also
password 7 083A5F173615543A333317172B6120
transport preferred none
transport input ssh
transport output telnet ssh
line vty 5 15
access-class vty_access_in in vrf-also
password 7 083A5F173615543A333317172B6120
transport preferred none
transport input ssh
transport output telnet ssh
09-01-2024 11:42 AM - edited 09-01-2024 11:50 AM
Hi @DuBu ,
If you get to the wrong device when using the host name and to the correct device when using the IP address then it is most likely a DNS issue. Can you check what the is the IP address linked to host "ABC" and change it to correct the issue.
You can use DNS tools like dig, nslookup, host, etc to verify the host name to IP address mapping.
Regards,
09-01-2024 11:48 AM
Hello @DuBu ,
check on OS shell how hostname is solved using
nslookup <ABC>
as suggested you may be facing a wrong DNS entry
Hope to help
Giuseppe
09-01-2024 01:48 PM
Hello
Curious where are you initiating the ssh connection?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide