作者qsort (Cos)
看板EZsoft
標題[教學]SSH tunneling with copSSH and plink
時間Fri Jun 20 22:17:12 2008
Before reading this document, you may need know what is tunneling.
Please wiki "Tunneling protocol" first^^
Server Side:
use
copSSH
Official Site:
http://www.itefix.no/copssh/
Download Path:
http://jaist.dl.sourceforge.net/sourceforge/sereds/Copssh_1.4.5_Installer.zip
Descript:
It's a SSH server ported from GNU/LINUX source project.
In GNU/Linux, it's run as "sshd" (Deamon Process).
In Windows, it use Cygwin to wrapper the sshd.
service execute: C:\Program Files\copSSH\bin\cygrunsrv.exe
service name: copSSHD
service friend name: Openssh SSHD
Step 1. Just install it.
Step 2. Choose an existed Windows user as login user.
(01. Activate a user)
By default, it would use /bin/bash for user shell.
For security, you may use redirect to /bin/false.
(only with plink.exe)
ps. SSH user password is just the same as
Windows login password.
Step 3. Try to modify "sshd_config" in your "install path"\etc of copSSH
You may customize your server setting here.
Wanna to keep the connection of SSH without timeout?
modify the file like below:
ClientAliveInterval 30
ClientAliveCountMax 10
TCPKeepAlive yes
If you do modify it, you need to restart the service
or just reboot.
Client Side:
use
PuTTY or
pieTTY or
plink.
You can download plink here:
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
It so easy to use plink:
Here is my example:
"plink.exe [email protected] -p 22 -D 80 -L 2211:ptt.cc:21 -N"
"qsort": user name
"111.222.333.444": ip of SSH server
"-p 22": Use port 22
"-D 80": Create a Dynamic forwarding tunnel(SOCK5)
on your local port 80
"-L 2211:ptt.cc:21" Create an static forwarding tunnel.
local port 2211 <=> ptt.cc:21
In that way, you can connect 127.0.0.1:2211 to
reach ptt. ^^
What's the tip to choice a tunnel method?
If your softwares support SOCK5:
please use Dynamic forwarding method.
ex:
Firefox, IE, MSN
If your softwares NOT support SOCK5:
please use static forwding method.
ex:
telnet(BBS), Remote Desktop, OutlookExpress.
ps.徵個人寫中文的GOOGLE DOC吧。
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.168.155.242
※ 編輯: qsort 來自: 218.168.155.242 (06/20 22:17)
※ 編輯: qsort 來自: 218.168.155.242 (06/20 22:20)
推 vixen:很讚, 馬上來試試看!! 06/20 23:21
推 HZYSoft:看起來非常讚的感覺! 06/21 01:19
推 vixen:注意:此安裝包的Cygwin會幫你在windows下多添加一個使用者! 06/21 07:08
→ qsort:不只一個喔...哈哈哈~~ 06/21 10:08