အေပၚကပံုေလးကေတာ့ Topology Simple ပံုေလးပါ။ကြ်န္ေတာ္တို႔က SSH ကေန Routing ကို Configure ခ် ခ်င္တာျဖစ္လုိ႔အရင္ဆံုး SSH ကို Enable ျဖစ္ေအာင္လုပ္ရပါမယ္။အဲ့ေနရာမွာ Telnet နဲ႔မတူတာအခ်ိဳ႕ရွိပါ တယ္။SSH enable လုပ္မယ္ဆိုရင္ေအာက္ပါအခ်က္ေတြလုိပါတယ္။အဲ့ဒါေတြကေတာ့....
- Domain Name
- Crypto Key
- SSH Enable Password
အေပၚကပံုေလးကေတာ့ SSH ကို Configuration ခ်ထားတာပါ။ဒီေနရာမွာ SSH အေႀကာင္းကိုပဲအဓိကေျပာ ခ်င္တာျဖစ္လို႔ SSH ကို Configuration ခ်ပံုကိုပဲေအာက္မွာအေသးစိတ္ေရးပါ့မယ္။က်န္တာေတြကိုေတာ့ခ်န္ ထားခဲ့ပါမယ္။SSH Enable လုပ္ပံုကေတာ့..
Router>en
Router#config t //Entering the global configuration mode
Router(config)ip domain-name uak.net //Assign the Domain Name of the Router
Router(config)host ns0 //Assign the Host Name of the Router
ns0(config)crypto key generate rsa //Generating general purpose RSA Keys
The name for the key will be:ns0.uak.net
Choose the size of the key modulus in the range of 360 to 2048 for your
General purpose keys.Choosing a key modulus greater than may take a
a few minutes.
How many bits in the modulus [512] : 1024
% Generating 1024 bits RSA keys, keys will be non-exportable... [ok]
အခု Domain Name ရယ္ Crypto Key ရယ္ျပီးသြားပါျပီ။ေနာက္တစ္ခုက SSH အတြက္ Username နဲ႔ Password ပါ။အဲ့ေနရာမွာနွစ္မ်ိဳးသံုးလို႔ရပါတယ္။ပထမတစ္မ်ိဳးက...
ns0(config) line vty 0 15
ns0(config-line)login local ဆိုပီးထားမယ္ဆိုရင္ Password မွာ Telnet မွာတုန္းကလိုပဲ Configure ခ်ရမွာျဖစ္ ပါတယ္။
ns0(config)username Jasmine password Sabae
ေနာက္တစ္မ်ိဳးက line configuration မွာ
ns0(config)line vty 0 15
ns0(config-line)transport input ssh ဆိုပီးထားခဲ့မယ္ဆိုရင္ ေတာ့ Password မွာအေပၚကလို Configure လုပ္ လို႔မရေတာ့ပါ။ေအာက္ကပံုစံအတိုင္းလုပ္ေပးရမွာျဖစ္ပါတယ္။ns0(config)username Jasmine secret Sabe
ေနာက္တစ္ခုက ssh ကိုအေသးစိတ္ Configure ခ်တာပါ။ေအာက္မွာႀကည့္ပါ။
ns0(config)#ip ssh ?
authentication-retries Specify number of authentication retries
break-string break-string
logging Configure logging for SSH
maxstartups Maximum concurrent sessions allowed
port Starting (or only) Port number to listen on
rsa Configure RSA keypair name for SSH
source-interface Specify interface for source address in SSH connections
time-out Specify SSH time-out interval
version Specify protocol version to be supported
အဲ့ဒါေတြအထဲမွာမွ SSH Version ရယ္ authentication အႀကိမ္အေရတြက္ရယ္၊Time Out ျဖစ္မယ္ အခ်ိန္ရယ္ ကိုပဲျပင္ပါ့မယ္။ေအာက္မွာႀကည့္ပါ။
ns0(config)ip ssh version ?
<1-2> Protocol version
ns0(config)ip ssh version 2 //Configure SSH version
ns0(config)ip ssh authentication-retries ?
<0-5> Number of authentication retries
ns0(config)ip ssh authentication-retries 3 //Configure Authentication Times
ns0(config)#ip ssh time-out ?
<1-120> SSH time-out interval (secs)
ns0(config)ip ssh time-out 30 //Configure Time Out Interval
ေနာက္ထပ္ Router ေတြကိုလည္းအဲ့လိုပဲ Configuration ခ်ရမွာပါ။SSH Password ကေတာ့ ႀကိဳက္ရာပံုစံနဲ႔ သံုးနုိင္ပါတယ္။Router အားလံုးမွာ SSH Configuration ခ်ပီးသြားရင္ေတာ့ ကြ်န္ေတာ္တို႔ SSH ကိုသံုးပီး Routing Table ေတြကို Configure လုပ္လုိ႔ရပါျပီ။ေအာက္ကပံုေလးကိုႀကည့္ပါ။
ေနာက္ပီးေတာ့ကိုယ္ Generate လုပ္ထားတဲ့ crypto key ေတြ၊Configure ခ် ထားတဲ့ SSH status ေတြကိုလည္း တစ္ဖန္ျပည္ျပီးႀကည့္နုိင္ပါတယ္။အေပၚကပံုေလးအတိုင္းပါပဲ။:)
SSH ဟာ authentication အတြက္ crypto key ေတြကိုသံုးတာျဖစ္လုိ႔ telnet ထက္စာရင္ပိုျပီး secure ျဖစ္ပါ တယ္။ဒါေပမယ့္ Telnet နဲ႔နွိုင္းယွဥ္ရင္ encrypt နဲ႔သြားတာျဖစ္လို႔ bandwidth ကိုပိုျပီး overhead ျဖစ္ေစပါတယ္။
အဲ့ေလာက္ဆိုရင္ SSH အတြက္လံုေလာက္ပီလို႔ထင္ပါတယ္။အေသးစိတ္ေလ့လာခ်င္ရင္ကြ်န္ေတာ္ Configure လုပ္ထားတဲ့ Simple ေလးကို ဒီေနရာ မွာယူနုိင္ပါတယ္။အာလံုးပဲအဆင္ေျပႀကပါေစ။:)
ေလးစားစြာျဖင့္
Win Tun Hlaing
Share ျပီး ျပီလားဗ်ာ....share လုိက္ျပီ
ReplyDeleteဖိုင္က လင္႔ပ်က္ေနၿပီဗ်ာ မီဒီယာက ၿဖစ္ၿဖစ္ လုပ္ပါအုန္း အကိုေရ
ReplyDelete