cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
26428
Views
45
Helpful
7
Replies

SSH using source interface gi0/1

getaway51
Level 2
Level 2

In cisco router, Is it possible to ssh using source interface or source ip address just like telnet ip /source-interface?

ciscoswitch#telnet 10.14.2.1 /source-interface gi0/1

7 Replies 7

Hello

Yes it is -

 

ip ssh source-interface x/x


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

I dont see this command in switch and router.

 

Switch1#ip ssh ?
% Unrecognized command

 

R1#ip ssh ?
% Unrecognized command

You have to go into configuration mode: conf t

Hi Paul, 

 

So , is this going to be  like a permanent configuration?

 

Every time I SSH to another network device this source interface I configured (for example Loopback 0) will be the source of my SSH connection?

 

Thanks,

If you start with config t and then enter the command ip ssh source-interface x/x and remember to copy run start then this is a permanent change and will specify the source address for any SSH initiated from this device. 

 

 

HTH

Rick

Thanks Richard. I tried it yesterday and it worked. I was doing an ASA firewall configuration where I applied a policy that only SSH from a specific loopback interface would be allowed and was wondering how to do that. This post helped me do it.

Glad that this discussion pointed you in the right direction. Thank you for sharing your experience with the community. This community is an excellent place to ask questions and to learn about networking. I hope to see you continue to be active in the community.

HTH

Rick
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: