[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

newbie question on port forwarding(and ssh, netcat)



Hi debianer!
I am a newbie both of debian and networking...
Recently I am trying to connect my home laptop(I have a router in my home) from office. I read several articles on port forwarding. And I succeeded in opening an 22 port on my router, also I started ssh server on my home laptop.

(suppose my username at home is USER, and my laptop is called DEBIAN)

I did several experiment and I got confusing in some of its result.

1. ssh USER@DEBIAN

works well!!

2. nc -vz my_home_external_ip 22
[my_home_external_ip] 22 (ssh) : Connection refused

I cant understand why is it. Because I have actually succeeded in test 1!

3. ssh -l USER my_home_external_ip
ssh: connect to host my_home_external_ip port 22: Connection refused
This also doesnt work! I thought it should be equivalent to test 1, but things just dont work.

Any one can explain this?


Reply to: