3

Assume I have 2 Ubuntu computer, and I will call:

Computer1: 192.168.11.155
Computer2: 192.168.11.186

I am using the Computer1 to access into Computer2 by using this command in the terminal: "ssh -v phucnguyen@192.168.11.186" and type password to access into Computer2. These things are easily done with internet connection.

Can I do similar those step without internet connection?

I do not how, but I believe we can do that, because I have done it before in the Windows OS. We have the "Microsoft Virtual WiFi Miniport Adapter" which is using as the router.

When "Microsoft Virtual WiFi Miniport Adapter" turn on, any device such as: phone, laptop,... can see network name of it and connect it by using password, even putty or ssh (with knowing IP address), you can look at this link for further infomation: https://answers.microsoft.com/en-us/windows/forum/windows_7-networking/what-is-microsoft-virtual-wifi-miniport-adapter/78a96f27-ae98-42e1-891d-e8651cd99748

If that router have no connection, but the option "Microsoft Virtual WiFi Miniport Adapter" still on, we can use putty or ssh access into computer and control it.I mean 2 Ubuntu computers is possible communicate via ssh without using internet.

Do we have any option similar in the Ubuntu machine?

3

You do not need "internet" to ssh into another computer, however both machines must be on the same LAN/vlan or at least connected to the same switch/router, even if that switch/router has no WAN(internet) connection.

Edit: a crossover cable can be used to directly connect the two computers together, you would have to set a static ip on both machines. Most newer computers with 1000baset nics can achieve the same thing using a straight through cable as opposed to a crossover cable

The configuration can be done through the network manager. Make sure your ethernet port is enabled by clicking the network manager icon and "enable networking"

  1. Click the network manager in the upper right hand side of the top bar
  2. Edit connections
  3. Add Connection
  4. Choose ethernet as the connection type.
  5. Choose your device under the Ethernet Tab (eth0, or in my case, enp0s3)
  6. Now under the IPv4 settings tab, change the method to manual
  7. Under Addresses select "Add"
  8. Set the Address and Netmask. Which in your case would be Address: 192.168.11.155 Netmask 255.255.255.0 (This is computer one, you would follow the same steps on computer two with a different address)
  9. After doing this on both machines See if you can ping the other computer.

    ping 192.168.11.155

If it responds then everything is working.

Another way to do this is with the command line (assuming your ethernet interface is eth0)

sudo ifconfig eth0 192.168.11.155 netmask 255.255.255.0 up

on computer 2

sudo ifconfig eth0 192.168.11.186 netmask 255.255.255.0 up

Then results of ifconfig for computer 1

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
    inet 192.168.11.155  netmask 255.255.255.0  broadcast 192.168.11.255
    inet6 fe80::59a0:5059:3115:bc2d  prefixlen 64  scopeid 0x20<link>
    ether 08:00:27:2a:98:ab  txqueuelen 1000  (Ethernet)
    RX packets 1982  bytes 2355318 (2.3 MB)
    RX errors 0  dropped 0  overruns 0  frame 0
    TX packets 391  bytes 49278 (49.2 KB)
    TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
  • I bring 2 computers into desert for example. There are no internet, nothing. And I do need internet, I just need 2 computer to communicate each other. Can 1 of those be set up as LAN or router? – phuc nguyen Apr 10 '17 at 16:10
  • You can use a crossover cable and connect the two computers together directly – nullmeta Apr 10 '17 at 16:50
  • It seems simple to me, but do I need to setup anything else, like I have to go into the system disable/enable any option? – phuc nguyen Apr 10 '17 at 17:54
  • The only thing to disable would be dhcp in /etc/network/interfaces and set both machines to a static IP address. Other than that there isn't anything else to enable/disable. – nullmeta Apr 10 '17 at 18:01
  • that should be more complicated, could you please provide more details? If possible, can you put in the the answer area, so I can put up vote for you. – phuc nguyen Apr 10 '17 at 18:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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