โปรแกรม Vnc ถ้าปกติเราติดตั้ง Vnc server จะเป็น Service ของ Windows ผู้ใช้งานสามารถ Link มาจากเครื่องอื่น ได้เลย อัตโนมัติ แต่การ Set แบบนี้จะมีความไม่ปลอดภัยตรงที่ว่า ฝั่ง Server เตรียมพร้อมตลอดเวลา ทำให้เกิดความเสี่ยงที่จะมีผู้ ไม่ประสงค์ดี ทั้งหลายเข้ามาช่วยดูแล Server ของเรา ฉะนั้นวันนี้มาดู วิธีการเปิด/ปิด vnc แบบ manual กันดีกว่า
1.ปิด Service VNC เป็น manual(ทดสอบได้โดย cmd เรียก net start "vnc server")
2.สร้าง Files code เปิด, ปิด vnc
3. Protect code
-ต้องใช้ program อาปาเช่ สร้าง Files User (ให้พี่บัญชาทำให้)
-(น่าจะใช้ program ใน spache - htpasswd.exe)
-ใน Folder ที่จะ protect ต้องมี file file .htaccess
คำสั่งใช้สร้าง files password ของ apache
รูปแบบการใช้งาน
หมายเหตุ
1.หลังจาก ทำแบบนี้แล้ว Vnc จะอยู่ใน mode ไ ม่สามารถใช้ File tranfer ได้
ทำให้ถ้าต้องการใช้ต้องไปสั่ง (ตามรูป)
1.ปิด Service VNC เป็น manual(ทดสอบได้โดย cmd เรียก net start "vnc server")
2.สร้าง Files code เปิด, ปิด vnc
Code เปิด Start.php อยูที่ program\vnc\vncstart.php
\n" ;echo nl2br(shell_exec ($c)); ?>
Code ปิด Stop.php อยุ่ที่ pro
gram\vnc\vncstop.php
\n" ;
echo nl2br(shell_exec ($c));
?>
3. Protect code
-ต้องใช้ program อาปาเช่ สร้าง Files User (ให้พี่บัญชาทำให้)
-(น่าจะใช้ program ใน spache - htpasswd.exe)
-ใน Folder ที่จะ protect ต้องมี file file .htaccess
AuthName "xampp user" AuthType Basic
AuthUserFile "C:\WebServer\xampp\scraf
t.htpasswd" require valid-user
คำสั่งใช้สร้าง files password ของ apache
รูปแบบการใช้งาน
htpasswd.exe -cb filename user pwd ตัวอย่าง htpasswd -cb useradm.pwd anan 00000 "สร้าง usradm.pwd โดยมี user=anan, passwo
rd=00000"
เพิ่ม user ใหม่ แบบมี files password แล้ว
htpasswd -b useradm.pwd adm.sa 00000
แก้ไข pwd user เก่าที่เคยสร้าง htpasswd -b useradm.pwd anan 11111
ลบ user
htpasswd -D useradm.pwd anan
หมายเหตุ
1.หลังจาก ทำแบบนี้แล้ว Vnc จะอยู่ใน mode ไ ม่สามารถใช้ File tranfer ได้
ทำให้ถ้าต้องการใช้ต้องไปสั่ง (ตามรูป)
