05-17-2023 08:23 AM
I am currently trying to use an alias so i can type hostname in to ssh instead of remembering IP address. Does anyone know how to input this in a switch 9300. I have tried alias exec ssh (ip address) (hostname) and it does not work any help would be really appreciated.
05-17-2023 10:04 AM
- Make sure that the hostname can be resolved by DNS on the switch ,
M.
05-17-2023 10:43 AM
Hi
If you have "ip domain name" and "ip domain lookup" on the device you should be able to access using ssh -l "user" device.domain
I would say alias is more suitable to hide a command or a group of command in one word.
05-17-2023 12:11 PM
To configure an alias for SSH access on a Cisco Catalyst 9300 switch, you need to use the ip host command. Here's the correct syntax:
Replace <hostname> with the desired alias or hostname and <ip-address> with the corresponding IP address. Here's an example:
To establish an SSH connection using the configured alias, you can simply type:
In this example, it would be:
Make sure you save the configuration using the write command to ensure the alias persists after a reboot.
If you're still encountering issues, please provide more details or error messages for further assistance.
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