LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2011, 02:51 AM   #1
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Rep: Reputation: 1
Lightbulb 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.
 
Old 04-06-2011, 03:13 AM   #2
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
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.
 
Old 04-06-2011, 03:19 AM   #3
brownie_cookie
Member
 
Registered: Mar 2011
Location: Belgium
Distribution: CentOS release 5.5 (Final), Red Hat Enterprise Linux ES release 4 (Nahant Update 8)
Posts: 416
Blog Entries: 2

Rep: Reputation: 12
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'
...
 
Old 04-06-2011, 04:13 AM   #4
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Original Poster
Rep: Reputation: 1
Thanks for replying
as i previously say i am on internet not intranet
 
Old 04-06-2011, 04:46 AM   #5
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Quote:
Originally Posted by aggrishabh View Post
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.
 
Old 04-06-2011, 11:43 PM   #6
aggrishabh
Member
 
Registered: Nov 2010
Posts: 87

Original Poster
Rep: Reputation: 1
please share the detailed steps to make it work.
 
Old 04-07-2011, 12:04 AM   #7
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
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.
 
Old 04-11-2011, 12:02 PM   #8
cgelici
LQ Newbie
 
Registered: Apr 2011
Posts: 1

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH concurrent session limit and idle session time out lasygsd Linux - Newbie 3 10-30-2014 08:56 AM
Apache - Tomcat How to use session ID to confirm an active user session? klroller Linux - Server 4 10-08-2009 10:43 PM
Mozilla Firefox v 3.0.11 - Changes to Bookmarks disappear from session to session. Dennola4 Slackware 2 07-19-2009 07:09 PM
Telnet session consumes 8KB which is never released after session is terminated NilesBor Linux - Kernel 1 04-24-2009 12:14 PM
LXer: Session Destroyer: Automatic Webapp Session Invalidation LXer Syndicated Linux News 0 12-31-2008 05:50 AM


All times are GMT -5. The time now is 12:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration