네트워크
Cisco Switch에서 텔넷 접속 암호를 설정하고 관리하는 방법
변군이글루
2013. 9. 6. 16:57
반응형
Cisco Switch에서 텔넷(Telnet) 접속 암호를 설정하고 관리하는 방법
스위치에 Telnet 원격 접속을 허용하려면 VTY(Virtual Terminal Line) 설정을 통해 암호를 지정해야 합니다.
1. 텔넷 접속용 암호 설정
vty 0~4 라인(기본 텔넷 세션 5개)에 암호를 설정합니다.
Switch> enable
Switch# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
텔넷 라인 진입
Switch(config)# line vty 0 4
텔넷 접속 암호 설정
Switch(config-line)# password 12345
로그인 시 암호 요청 활성화
Switch(config-line)# login
Switch(config-line)# end
%SYS-5-CONFIG_I: Configured from console by console
2. 설정 내용 확인
현재 설정을 확인해 보겠습니다.
Switch# show running-config
Building configuration...
Current configuration : 956 bytes
!
version 12.1
no service password-encryption
!
hostname Switch
!
interface Vlan1
ip address 218.234.13.10 255.255.255.0
!
line con 0
!
line vty 0 4
password 12345
login
line vty 5 15
login
!
end
line vty 0 4 구간에 password 12345와 login 명령이 적용되어 있으면 텔넷 접속 암호가 정상 설정된 것입니다.
728x90
3. 설정 저장
구성한 설정을 NVRAM에 저장하여 재부팅 후에도 유지되도록 합니다.
Switch# copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
copy running-config startup-config 명령은 현재 설정을 영구 저장하는 필수 단계입니다.
4. PC에서 텔넷 접속 테스트
이제 PC에서 스위치로 텔넷 접속을 시도합니다.
PC> telnet 218.234.13.10
Trying 218.234.13.10 ...
User Access Verification
Password:
위와 같이 Password 프롬프트가 표시되면 텔넷 암호가 정상적으로 적용된 것입니다.
암호 12345를 입력하면 스위치 CLI에 접속할 수 있습니다.
5. 텔넷 암호 해제(비활성화)
텔넷 암호를 제거하거나 접속 제한을 해제하려면 다음과 같이 설정합니다.
Switch# configure terminal
Switch(config)# line vty 0 4
기존 암호 제거
Switch(config-line)# no password
로그인 시 암호 요청 비활성화
Switch(config-line)# no login
Switch(config-line)# end
기존 암호 제거
Switch(config-line)# no password
주의 : no login 상태에서는 아무나 텔넷으로 접근 가능하므로 실제 운영 환경에서는 절대 권장되지 않습니다.
암호 대신 enable secret 또는 AAA 인증 구성을 사용하는 것이 좋습니다.
TIP : 암호를 단순히 노출하지 않으려면 다음 명령으로 암호 암호화를 활성화합니다.
Switch(config)# service password-encryption
이렇게 하면 show running-config 시 암호가 암호화되어 표시됩니다.
(password 7 030752180500 형태로 나타남)
728x90
반응형