Cisco ASA SSH Access

Для начала, необходимо имя хоста и домена.

ciscoasa(config)# hostname 
ASAASA(config)#

В имени допустимо максимум 63 символа

ASA(config)# domain-name unix.ntASA(config)#

Далее, естественно, должен быть задан пароль для входа в администраторский режым.

ASA(config)# enable password $uper$ecret level 15

Конечно же, должно быть задано имя и пароль пользователя c с необходимыми привилегиями

ASA(config)# username andrey password @ndreypa$$ pri 15

Теперь можно сгенерировать ключ шифрования.

ASA(config)# crypto key generate rsa
INFO: The name for the keys will be:Keypair generation process begin. Please wait...
ASA(config)#

Переходим непосредственно к настройке SSH. Указываем версию:

ASA(config)# ssh version 2
ASA(config)# ssh ?
configure mode commands/options:
Hostname or A.B.C.D The IP address of the host and/or network
authorized to login to the system
X:X:X:X::X/<0-128> IPv6 address/prefix authorized to login to the system
scopy Secure Copy mode
timeout Configure ssh idle timeout
version Specify protocol version to be supported

exec mode commands/options:
disconnect Specify SSH session id to be disconnected after this keyword


Указываем откуда разрешить логин.

ASA(config)# ssh 192.168.10.0 255.255.255.0 ?
configure mode commands/options:
Current available interface(s):
exit Name of interface Ethernet0/0.10
outside Name of interface Ethernet0/0
ASA(config)# ssh 192.168.10.0 255.255.255.0
ASA(config)# ssh 192.168.10.0 255.255.255.0 exit

Тут у меня exit это имя интерфейса, а разрешил я целую подсеть.Теперь SSH запущен, но чтобы авторизироваться под созданным пользователем нужно ввести команду

ASA(config)# aaa authenticatication ssh console LOCAL

Как видно из адресации, у меня ASA в локальной сети, так что неплохо бы добавить адреса DNS и шлюза.

ASA(config)# dns domain-lookup ?
configure mode commands/options:
Current available interface(s):
exit Name of interface Ethernet0/0.10
outside Name of interface Ethernet0/0
ASA(config)# dns domain-lookup exit
ASA(config)# dns name-server 8.8.8.8
ASA(config)# route exit 0.0.0.0 0.0.0.0 192.168.10.1
ASA(config)# ping google.com
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 173.194.44.46, timeout is 2 seconds:!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/44/50 ms
ASA(config)#

Посмотреть активные сессии можно так

ASA# show ssh sessions
SID Client IP Version Mode Encryption Hmac State          Username
1  192.168.10.9 2.0   IN   aes128-cbc md5  SessionStarted   andrey
                      OUT  aes128-cbc md5  SessionStarted   andrey
ASA#

Ответить

Вы должны быть зарегистрированы в для возможности комментировать.