LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to take session over the internet (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-take-session-over-the-internet-873267/)

aggrishabh 04-06-2011 01:51 AM

how to take session over the internet
 
Hi All,

i am having a pc at my home running CentOS 5.5 and connected to the internet can i take session of it through PUTTY or something else sitting somewhere else and connected to the internet..


Thanks in advance.

dudeman41465 04-06-2011 02:13 AM

You can install sshd on the CentOS machine and log into it via SSH from Putty. If the local machine is Linux as well, you can use ssh -X from a command line to allow you to launch graphical applications from the server on your local machine.

You can also use one of several VNC servers if you're looking for more of a remote desktop style approach.

brownie_cookie 04-06-2011 02:19 AM

if you use the ssh commands and want to use several commands (or use a pipeline) than use -> if you want the output of the first command needed to be as the input of the second command:

Code:

ssh user@host 'command1; command2; command3'
and NOT

Code:

ssh user@host 'command1'
ssh user@host 'command2'
...


aggrishabh 04-06-2011 03:13 AM

Thanks for replying
as i previously say i am on internet not intranet :)

dudeman41465 04-06-2011 03:46 AM

Quote:

Originally Posted by aggrishabh (Post 4315459)
Thanks for replying
as i previously say i am on internet not intranet :)

You can use these features over the internet too, I do it with my server. You just have to make sure that you have the proper ports forwarded on your router, and that, preferably, the server has a reserved IP address so your port forwards don't end up pointing to a different machine when you reboot your router or something.

aggrishabh 04-06-2011 10:43 PM

please share the detailed steps to make it work.

dudeman41465 04-06-2011 11:04 PM

1) Install and configure sshd on your server. If you can log in via SSH on your local network you're good, just make sure that you configure it to be as secure as possible. Use non-default ports, disable guest/anonymous logins, etc. More can be found here:

Linkage

2) Assign a static IP to your server, either on the server itself, or by setting up a reservation on your router. If you assign the IP manually on your server, be sure to exclude that IP address from the DHCP pool on your router so it doesn't get handed out to another device. This IP is an internal IP address in the same subnet as every other device on your network, you just want to make sure that once you forward the ports they will always point to the right device.

3) Forward the SSH port to your server's static IP address. The default port for SSH is 22. The method for forwarding ports on your router is also dependent on the type of router you have.

4) I recommend, if your router supports it, signing up for a Dynamic DNS name on something like dyndns.org, and then configuring your router to automatically update whatever hostname you pick. That way if you're out away from the house and you want to log into your server, you can do so using a hostname like yourserver.homeip.net instead of having to worry about figuring out what your public IP is, and checking to see if it's changed recently.

cgelici 04-11-2011 11:02 AM

I have tried this too but it won't work and I don't know why. I don't need a DynDNS host name because my ip is static. I setup my SSHD to listen on port 443 and I can successfully connect within my LAN but not from outside which is my intention. Plus VNC too eventually.

Port 443 is forwarded in my router to my static LAN IP 192.168.1.22.

I use Backtrack as server OS and backbox/ubuntu via Live USB and also putty from windows.

None will connect to public IP.

nmap localhost -p 443 tells me port 443 is OPEN
nmap publicip -p 443 tells me it is CLOSED

online port scanners tell me it's OPEN and listening. So does netstat -antp | grep 443

Can anybody help me connect ?

PS: I chose 443 for two reasons.
1. It's more secure than standard port 22
2. I want to tunnel http traffic encrypted too.

I tried a random port (60370) but with the same results.

All I want is to connect to my box from anywhere in the world. And eventually get VNC access too.


All times are GMT -5. The time now is 07:57 AM.