Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have two laptops (both wifi enabled) and a wireless router. I want to use one of the laptop on a robot and other laptop to SSH into the first one. Is it possible to connect the two PCs even if I don't have a modem or internet and just use the wifi router? If so how to do that? I learned about the ad-hoc network, but I am unable to create an ad-hoc network on my macbook pro 6'2 with ubuntu 11.10, so i need an alternate method.

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

I haven't tried this before, but here's what you can do -

First install an ssh server on the laptop you whish to ssh to.

For ubuntu type this in the terminal -

sudo apt-get install openssh-server

And for the other laptop -

sudo apt-get install openssh-client

Type ifconfig on your server laptop to find out its ip address.

You can then connect to you server -

ssh (server IP)

You can add static IPs to both of your laptops so that their addresses don't change!...

Hope this helps.

share|improve this answer
    
Thanks for your reply, how to obtain the static IP for both laptops. Will the router provide a static IP or dynamic IP ? –  Ankit Oct 13 '12 at 8:38
    
Set A Static IP On Ubuntu. Remember to backup /etc/network/interfaces before you make any changes. –  Interpol3r Oct 19 '12 at 20:43
add comment

The wifi router will work regardless of whether you have internet. So, both laptops will be connected using the router as a common link. So, to ssh to one of them you'd use something like ssh 192.168.1.2. Of course, replace the IP address with the IP address of the laptop you're connecting to. You might ditch DHCP and use static IP addresses for them so that one laptop is always 192.168.1.2 and the other is always 192.168.1.3.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.