Cisco VLAN – SSH from Specific VLAN Not Working

access-controlciscovlan

I am doing some practice on GNS3 related switch and want to allow SSH from specific VLAN Ex: vlan1

In GNS3 i used router with 16NM ethernet module to emulate switch, so i am using following command to tell allow SSH from only vlan1, it seems not working. Do i need ACL ?

ip ssh source-interface vlan 1

EDIT

I have following cisco config. but its not working

 line con 0
  stopbits 1
 line aux 0
 line vty 5 15
  access-class ALLOW-SSH in

Best Answer

You are using the wrong command. ip ssh source-interface command defines the source IP when starting an SSH session from the router. It has no effect on other traffic.

To control who can SSH into your router, you use an ACL and access-class.

ip access-list standard ALLOW-SSH
permit 192.168.100.0 0.0.0.255

line vty 0 15
transport ssh
access-class ALLOW-SSH in