using an alias for ssh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Labels:
-
Network Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2023 10:04 AM
- Make sure that the hostname can be resolved by DNS on the switch ,
M.
-- Each morning when I wake up and look into the mirror I always say ' Why am I so brilliant ? '
When the mirror will then always repond to me with ' The only thing that exceeds your brilliance is your beauty! '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
