LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   connection between two platforms (https://www.linuxquestions.org/questions/linux-newbie-8/connection-between-two-platforms-473274/)

robingazi 08-12-2006 11:42 AM

connection between two platforms
 
Hi
I have debian Etch (kernels 2.6.17-1 em64t smp from sid/unstable) installed in my home pc. I have an ip that starts with 172. i have a DNS which start with 203 and a default gateway starting with 172. I dont have access to the DNS servers.

On the other hand at work i have windows XP. My work has a ip that starts with 192 and the DNS starts with 202 and the default gateway starts with 192.

Both the pc's have 255.255.255.0 as subnet mask.

Now to my question. How do I connect to my home pc using putty or any other client you might suggest? What are the software i need to install on my debian and how do i configure that software and putty?

Thank you in advance. :)

ichrispa 08-13-2006 04:01 AM

you will need a ssh-server installed and running on your home pc. I suggest openssh. From putty, you will need to enter your home-pcs complete IP. If your are using DSL with a modem/router/switch, that might be a problem, because the internal home-network will automaically be using NAT (Name Adress Translation), meaning you can only adress your router, not the pc's behind that router. How to solve this problem depends on the capabilities of your routers hardware.

lotusjps46 08-13-2006 08:16 AM

I believe Debian installs the SSH server daemon by default. Look up how to start the SSH server.

Set up your router to forwared port 22 to the Debian box. I do not know what kind of router you have, but somewhere the interface should have a section for Virtual Server, or Port Forarding. In it you put the IP address of the Debian machine on your local LAN. That is, use the IP address you get on the Debian machine using "ipconfig" in a terminal as root. You will probably have to reboot the router to have it take effect. When it has rebooted, copy down the IP address of the router on the internet (the WAN address). You can confirm that you have the right address by opening a browser and typing in "www.whatismyip.com". That will give you your Internet IP.

On the Windows box, open PuTTy and put in the IP address you copied down at home in the Host Name box, and select "SSH". Give this connection a name, and hit Save, then Open. It should ask for a name (your log on name at the Debian box, NOT root) and password (what you use on the Debian box). Look here for more information about PuTTy:

http://www.jfitz.com/tips/putty_config.html

It should connect. If it gives you a warning about not knowing who you are just accept it and go on. If it does not connect you will have to configure the SSH server to let you use a password. I have to go look that one up.

Good luck

C

JimBass 08-13-2006 11:29 AM

Minor nitpick, but it isn't "ipconfig" in the *nix world, it is "ifconfig". Also, just to find out the IP info you already have, you don't need to be root. Any user on a debian (and most other distros I assume) will tell you your IP address by asking for it correctly. The way to do that is /sbin/ifconfig

Code:

jim@worklap:~$ /sbin/ifconfig
eth0      Link encap:Ethernet  HWaddr 00:D0:59:D7:5B:4B
          inet addr:192.168.68.102  Bcast:192.168.68.255  Mask:255.255.255.0
          inet6 addr: fe80::2d0:59ff:fed7:4b3b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:490599 errors:0 dropped:0 overruns:0 frame:0
          TX packets:420875 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:297050939 (283.2 MiB)  TX bytes:240680551 (229.5 MiB)

Peace, JimBass

robingazi 08-13-2006 01:40 PM

This is what i get when i do ifconfig.

Quote:

eth0 Link encap:Ethernet HWaddr 00:13:D3:C9:67:6F
inet addr:172.16.5.75 Bcast:172.16.5.255 Mask:255.255.255.0
inet6 addr: fe80::213:d3ff:fec9:676f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:9955 errors:0 dropped:0 overruns:0 frame:0
TX packets:3286 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:4454318 (4.2 MiB) TX bytes:389287 (380.1 KiB)
Interrupt:201 Base address:0x4800

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:121 errors:0 dropped:0 overruns:0 frame:0
TX packets:121 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8140 (7.9 KiB) TX bytes:8140 (7.9 TiB)
The problem is I do not have a router. I get internet connection via lan. The isp [like most isps in Bangladesh] gave me an eathernet card and a cable. They provide me with internet via lan. I do have a D-link switch installed though since I have another pc at home. The problem is I do not have access to any routers of my ISP or the server my ISP uses.

lotusjps46 08-13-2006 03:19 PM

OOps, sorry about the "ipconfig" thing. I have been working on XP boxes and it has damaged my brain.

Not sure how you can connect to ssh if you are behind your ISP's router and cannot open port 22. You can try going to www.whatismyip.com to get the WAN IP of the ISP router, but unless they have port 22 open you will not be able to connect. You could contact the ISP and see if they would direct port 22 to your IP on the LAN (172.16.5.75) but failing that I am not sure what you can do. It might be possible to set the SSH server to work on port 80, then set PuTTy to use port 80 also (since port 80 is open by default on the router for web traffic) but I have no idea what the implications of that are. You can change the port for the ssh daemon in /etc/ssh/ssh-config.

Good luck.

C

JimBass 08-13-2006 03:24 PM

172.16.5 is a private IP. If that is the address that is you are getting from your ISP, then there is no way to connect to your box from outside their network unless they are willing to forward requests to your machine.

Peace,
JimBass

robingazi 08-13-2006 07:17 PM

This is what i get when i go to that webpage.
Quote:

Your IP Is
203.112.202.253
Are there any configureations I need to do before i call my ISP for port forwarding? BTW i have installed openssh-server and ssh. I dont know how to configure them. I tried dpkg-reconfigure openssh-server but that I think only restarts the programme.

This is my process list. I believe the second last one is openssh-server.

Quote:

1 ? Ss 0:01 init [2]
2 ? S 0:00 [migration/0]
3 ? SN 0:00 [ksoftirqd/0]
4 ? S 0:00 [watchdog/0]
5 ? S 0:00 [migration/1]
6 ? SN 0:00 [ksoftirqd/1]
7 ? S 0:00 [watchdog/1]
8 ? S< 0:00 [events/0]
9 ? S< 0:00 [events/1]
10 ? S< 0:00 [khelper]
11 ? S< 0:00 [kthread]
14 ? S< 0:00 [kblockd/0]
15 ? S< 0:00 [kblockd/1]
16 ? S< 0:00 [kacpid]
115 ? S< 0:00 [khubd]
117 ? S< 0:00 [kseriod]
162 ? S 0:00 [pdflush]
163 ? S 0:00 [pdflush]
164 ? S 0:00 [kswapd0]
165 ? S< 0:00 [aio/0]
166 ? S< 0:00 [aio/1]
1662 ? S< 0:00 [ata/0]
1663 ? S< 0:00 [ata/1]
1685 ? S< 0:00 [scsi_eh_0]
1686 ? S< 0:00 [scsi_eh_1]
2040 ? S< 0:00 [kjournald]
2211 ? S<s 0:00 udevd --daemon
3685 ? S< 0:00 [kpsmoused]
3688 ? S 0:00 [saa7134[0]]
3917 ? S< 0:00 [hda_codec]
5083 ? Ss 0:00 /sbin/syslogd
5089 ? Ss 0:00 /sbin/klogd -x
5154 ? Ss 0:00 /usr/sbin/acpid -c /etc/acpi/events -s /var/run/acpid
5165 ? S 0:00 hald-runner
5186 ? S 0:00 /usr/lib/hal/hald-addon-storage
5247 ? Ss 0:00 /usr/sbin/inetd
5317 ? Ss 0:00 /usr/sbin/cron
5332 ? Ss 0:00 /usr/sbin/gdm
5337 ? S 0:00 /usr/sbin/gdm
5338 tty7 Ss+ 0:22 /usr/X11R6/bin/X :0 -dpi 96 -audit 0 -auth /var/lib/g
5349 tty1 Ss+ 0:00 /sbin/getty 38400 tty1
5350 tty2 Ss+ 0:00 /sbin/getty 38400 tty2
5351 tty3 Ss+ 0:00 /sbin/getty 38400 tty3
5352 tty4 Ss+ 0:00 /sbin/getty 38400 tty4
5353 tty5 Ss+ 0:00 /sbin/getty 38400 tty5
5354 tty6 Ss+ 0:00 /sbin/getty 38400 tty6
6167 pts/0 S 0:00 su
6168 pts/0 S 0:00 bash
6225 ? Ss 0:00 /usr/sbin/sshd
6226 pts/0 R+ 0:00 ps x

lotusjps46 08-14-2006 09:24 PM

Well, someone has an ssh server running at that IP address. In a shell, this is what I got when I tried it:

chuck@tbird:~> ssh 203.112.202.253
The authenticity of host '203.112.202.253 (203.112.202.253)' can't be established.
RSA key fingerprint is b8:cc:bd:62:17:eb:12:ff:3d:63:61:1a:06:9a:f3:f3.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '203.112.202.253' (RSA) to the list of known hosts.
chuck@203.112.202.253's password:
Permission denied, please try again.
chuck@203.112.202.253's password:


I do not know your password, or what your log-on name is, but it looks like you can start using ssh. Use

ssh yournamehere@203.112.202.253

Good luck.

C

robingazi 08-14-2006 11:47 PM

I had already tried that. It appears 203.112.202.253 is not my machine since it doesnt accept my username or passwd. Its probably a server of my isp. not too sure though.

lotusjps46 08-15-2006 07:02 AM

There is a way to have ssh listen to another port on your computer (not 22; see /etc/ssh/ssh-config). If you can get the ISP to point that port to your computer at your IP (not 203.112.202.253) then it would work, but you have to get them to do this. I do not know of any other way to resolve this.

Good luck.

C

danga1993 08-15-2006 01:47 PM

I seems higly unlikely that your isp can stretch a cat5 cable all the way from you to them. There must be some mechanism where it is converted to another system.

But I guess it's possible, I hear new stuff every day.

Cheers :D

robingazi 08-15-2006 07:27 PM

I believe they use UTP cables and there are switches installed every 100 metres or so. The provide internet almost to all homes in my neighbourhood and some other surrounding neighbourhoods.


All times are GMT -5. The time now is 04:07 PM.