Question:
Can I link two wifi devices without a router?
2016-01-09 00:15:47 UTC
I am trying to link my phone to my computer, so I can access the SSH (or maybe even VNC) without actually taking out my computer. The phone is android and the computer is linux. Currently I have an app called weaved that can let me do this over the internet, and I was looking into port forwarding, but I would like to have that access without relying on a wifi connection for either of my devices.

I am fairly new to computing and programming so I really wont mind if you talk to me like an idiot.

Any and all help is greatly appreciated! Thank you in advanced!
Three answers:
?
2016-01-09 01:27:09 UTC
I don't understand why you are having a problem.



The computer (at home) should be connected by Ethernet to your router, which you would have port forwarded as necessary. If you port forward port 22 (SSH) that sounds as though it should work. You can even disable the wireless network from the router.



For the phone (away from home), use mobile Internet over the cellular network. That way neither device will be using WiFi.



Set the computer on a static address on your internal network, and if your public IP address is dynamic, go with a DDNS service such as noip.com (or one of the other DDNS services). That way you will have a fixed URL to you home.



I hope this helps.





Following ratter_of_the_shire's comment. I had the question confused. The remarks about Port Forwarding and "without WiFi" in the question threw me.



I guess you could enable the phone's WiFi hotspot, without mobile Internet being enabled, then connect the Linux box to the hotspot. If you know the computer's IP address, then you should be able to open a SSH connection to it with a suitable App on the phone. I have done this the other way round, where I have downloaded files from my phone to my laptop using the WiFi File Transfer App on the phone and a browser on my laptop. However, I don't have WiFi on my Linux systems so I have been unable to try connecting in the set-up you describe.



Sorry the original part of the answer was wrong. I'm leaving it in place in case it is useful to others.
BigE
2016-01-09 06:31:31 UTC
Can't figure out what you mean. Yoiu mean not using WIFI or you want access via your Cell network as opposed to WIFI (on the android).



So it should work fine with WIFI without weaved native to your computer, say with ssh, provided iptables is correct on the Linux box. You have to use the local IP of the LInux box. (You can use dynamic DNS later once you figure this part out).



So on the Cell network, you need to port forward. You need to setup a port forward from your router (you can use port 22 inbound or another port) to the local IP of your computer/port 22. Once again, you need to see if iptables is configured to allow port 22. You need to ssh into the External/Pubilc IP number of course.



Actually, I'd probably use a different port inbound because once the internet sees port 22 open, people bang on it with login attempts. Make sure the /etc/ssh/sshd_config has root password set for (I believe) without_password. This disallows root to login with a password via ssh. SInce you can use sudo, root login over the network is not needed, and you can still use ssh pub keys for root, if you need it.



There are techniques to reduce the login attempts via a rate limiter in iptables.
ratter_of_the_shire
2016-01-09 12:46:41 UTC
On the Linux box it's likely (but varies by hardware capability or the wireless chipset) that you can run an access point. Hostapd will configure the wireless chipset as an access point and dnsmasq is a lightweight dhcp server/deamon that will assign an IP to connected clients.



Alternatives may be an ad-hoc or mesh network, but it's likely you'll need root on your phone to do this.



Another option if is your phone supports bluetooth, is to open up a serial connection over bluetooth, and run a user TTY session over it. Won't interfere with normal wireless connectivity, may or may not be well supported in the app store.



http://blog.miguelgrinberg.com/post/a-cheap-bluetooth-serial-port-for-your-raspberry-pi


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...