Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to ssh to my office Linux PC

Reply
Thread Tools Display Modes

How to ssh to my office Linux PC

 
 
Bin Chen
Guest
Posts: n/a

 
      01-28-2007, 09:37 AM
Hi,

I have a Linux PC in my office, which is in a LAN that have a IP
address of 192.168.0.8. The Linux can connect to internet by company's
router. But I can't tell the network administrator to do anything,
such as open a NAT port in the router.

Sometimes I am in home and want to continue my work, so in my
circumstance is it possible for me to ssh to my office PC?

Thanks.
Bin Chen

 
Reply With Quote
 
 
 
 
Benjamin Kwiecien
Guest
Posts: n/a

 
      01-28-2007, 09:49 AM
Sup BC.

I recall a colleague of mine of mine dealing with this kind of situation
(accessing a host on a subnet) by creating a virtual private network.
I wish I could be more specific, but hopefully someone who knows more
than I do will step up and elaborate.

Ben

On 2007-01-28, Bin Chen <(E-Mail Removed)> wrote:
> Hi,
>
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.
>
> Sometimes I am in home and want to continue my work, so in my
> circumstance is it possible for me to ssh to my office PC?
>
> Thanks.
> Bin Chen
>

 
Reply With Quote
 
Bo Yang
Guest
Posts: n/a

 
      01-28-2007, 11:24 AM
Bin Chen :
> Hi,
>
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.

If you can't use the NAT mechanism, I think maybe you can let your
office connect to your home computor actively!

> Sometimes I am in home and want to continue my work, so in my
> circumstance is it possible for me to ssh to my office PC?
>
> Thanks.
> Bin Chen
>

 
Reply With Quote
 
Volodymyr M. Lisivka
Guest
Posts: n/a

 
      01-28-2007, 01:59 PM
Bin Chen wrote:
> Hi,
>
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.
>
> Sometimes I am in home and want to continue my work, so in my
> circumstance is it possible for me to ssh to my office PC?


Install a bot for your favorite IM system (Jabber(gmail), ICQ/AIM, YIM,
MSN) and use it to control your office or home machine.
 
Reply With Quote
 
Mihai Osian
Guest
Posts: n/a

 
      01-28-2007, 03:54 PM
Bin Chen wrote:
> Hi,
>
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.
>
> Sometimes I am in home and want to continue my work, so in my
> circumstance is it possible for me to ssh to my office PC?
>
> Thanks.
> Bin Chen
>


Hi,

If your machine at home has a real IP address and you don't mind letting
it run over day (while you are at work), you can try ssh port forwarding.

Steps:
1. Install ssh servers both on the office machine and your home computer
2. On the office machine, issue the following command:
ssh -R PORT:localhost:22 home_user@your_home_machine.com -N
<Enter your home_user password.>
Leave the program running.
PORT is a port number of your choice (above 1024).
3. From home:
ssh office_user@localhost -p PORT
<Enter the office_user password>
You should now get a console on the office machine.

How it works: in step 2 you connect from office to home and tell your
home ssh server to forward all connections to the (home) port PORT, via
the secure channel, to (office)localhost:22.
In step 3 you connect to (home)localhost:PORT. That connection request
is tunneled to port 22 (ssh) of the office machine.

Depending on the speed of your connection, you may consider using
compression (add -C to the ssh line in step 2).

More info: man ssh

Hope this helps,
Mihai
 
Reply With Quote
 
Logan Shaw
Guest
Posts: n/a

 
      01-28-2007, 07:43 PM
Bin Chen wrote:
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.


192.168.x.x are all unroutable addresses. They are only allowed on
private networks that do not directly connect to the Internet. Therefore,
it is impossible (without support from the NAT router) for your home
machine to initiate a connection to the machine: 192.168.0.8 is not public,
so there is no way for your home machine to specify a destination address.

One possible solution, if your home machine has a public IP address,
is set up a VPN link. Your Linux PC at the office would initiate the connection
(either TCP or UDP) that carries the VPN data, your home machine would
accept the connection, and both machines would join a virtual network,
giving each machine an additional IP address on the virtual network.

However, there are security implications to this. You are creating a link
where packets can flow without being filtered. You would want to check
with your network administrator to find out if this violates company policy.
It is usually not worth it for the company if you can work from home but
the cost is greater uncertainty and complication when it comes to security.

If they don't have a problem with setting up a VPN, then some fairly good
VPN software is OpenVPN (www.openvpn.org). It's cross-platform, and
on Linux, I believe it can often be installed without rebuilding the kernel.
(It doesn't require its own kernel module; it just requires that some standard
modules are already included.)

- Logan
 
Reply With Quote
 
David T. Ashley
Guest
Posts: n/a

 
      01-29-2007, 02:44 PM
"Bin Chen" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> Hi,
>
> I have a Linux PC in my office, which is in a LAN that have a IP
> address of 192.168.0.8. The Linux can connect to internet by company's
> router. But I can't tell the network administrator to do anything,
> such as open a NAT port in the router.
>
> Sometimes I am in home and want to continue my work, so in my
> circumstance is it possible for me to ssh to my office PC?


In addition to the solutions suggested by other posters, you might try
setting up a server outside the company and using that. Sometimes that is
the cleanest solution depending on your needs. You can use the same server,
both from work and home.

It depends on what you're trying to accomplish. For version control and
certain other applications, it works great.

--
David T. Ashley ((E-Mail Removed))
http://www.e3ft.com (Consulting Home Page)
http://www.dtashley.com (Personal Home Page)
http://gpl.e3ft.com (GPL Publications and Projects)


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Any VPN client for RH linux to connect to office VPN server (Sonicwall) GS Linux Networking 2 03-30-2007 06:25 PM
small office net Brett Home Networking 2 08-11-2004 07:58 AM
Installing RH Linux firewall in Home office for security, how can I VPN passthrough? Santa Linux Networking 0 07-20-2004 03:09 AM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] -new ! TEL Linux Networking 0 12-01-2003 12:06 PM
Red Hot Linux v9.0 [2 DVDs]. Red Hot Linux v9.0 [3 CDs]. Redhat Enterprise Linux ES v3.0 REPACK [4 CDs]. Mandrake Linux 9.2 [3 CDs] - new ! TEL Linux Networking 0 11-29-2003 11:27 AM



1 2 3 4 5 6 7 8 9 10 11