Friday, June 20, 2014

SSH connection to a remote computer

Hi everyone,

Most of the time, we need to connect to a remote computer for accessing some files or running some programs remotely for data collection or other purposes.
In the following description, i ll be going through a method that i found very simple and useful for one of the tasks i wanted to perform on a PC on-board a Pioneer 3-AT mobile robot. Following steps need to be followed:

1- Connect both the computers to a common network. This can be achieved using a wired or a wireless connection. I used wireless USB dongle (ZyXEL AG-225H v2 802.11a/g Wi-Fi Finder & USB Adapter
) at my client end PC and a TP-Link nano router (Remember using it in AP mode) at the host end PC.

ZeXEL Dongle
TP link nano Router













2- If you are not very comfortable with networking concepts yet, consider assigning "Static IP addresses" to the two computers, making sure they are IP addresses of the same network.

3- Confirm the connectivity using ping on both ends.
In case of failure, try turning off the firewall and rechecking the IP addresses at both ends. (In this case, you might need to verify the settings of router also)

4- Download a free software PuTTY from www.putty.org/ at the client end

5- Run the software by putting the Host IP in the specified field: (Make sure in the Connection type: SSH is checked and the Port # is 22)

6- Ideally when you press Open, you should be prompted to enter login and password in a console environment as follows:


Just plug in Login and password details of host user in this window and you will be in a DOS environment like this:

Thats it! you can run different data acquisition softwares like camera or sonar routines remotely and collect data.

7- Most of the time, however, you are not that lucky to get everything so smoothly. Following is one of the different problem cases you may face after step 5:



The solution for this is to check if the port 22 is in 'listening mode' at the host end. You can check that by typing 'netstat -a' at the command prompt. 

You need to check the middle column here. There are IP addresses with Port # after a colon to the right. These are the IP addresses with whom your host end PC is in a specific state (again check the last column of the output).
As in this case, there is no therefore, you need to make it listen to port 22 first through the client end IP. One easy way is to get an SSH server software like FreeSSH. In this software you can easily configure an SSH server in the host pc by following the guidelines given at the link: http://www.freesshd.com/?ctt=overview

Good Luck!


Saturday, April 5, 2014

Display Problems faced in installing Linux Distributions

Assalam o alaekum everyone!
(May Peace and blessings of Allah be upon you all),

Following are the solutions that helped me recover from the display problem

For fedora display problem:

In bootloader, when you are  on the option of Fedora, press 'e'.
This will open up several boot commands (like in the following figure)

Inline image 2
 Find the instruction starting with 'linux', go to the end of the instruction and write after a space 'vga=0x317' (This number varies for different resolutions. I havent come across any formula so far). After this, press F10 to run Fedora. 

For Debian display problem:
(This solution is for those users who are running a LILO bootloader)
When powering up the system, start pressing some key e.g. 'up arrow' key. You will be directed to a boot menu (Menu will be of Red Color if you are using LILO bootloader) like this:

Inline image 1

In the commandline, write 'linux vga=0x317' and then press enter to run Debian operating system.

A permanent solution to this i found out later on. Once you have booted the Operating System, you can go to the directory /etc/ and open the lilo.conf. In the config file, find the line starting with "vga". There will be a code block containing some vga commands. In those commands, if there is a direct assignment like vga=some number, either overwrite or comment out that, and write this line
"vga=0x317"
Save and exit the configuration file, and reboot the system.

I hope this helps.