16 October, 2014

How to share internet connection in Ubuntu to a Raspberry Pi over LAN cable


Before we dig deep on this subject, I assume we got a Laptop connected to the internet over wifi and we are running Ubuntu on it. Now connect the Raspberry Pi (running raspbian os) to the laptop using a LAN cable. 




To share the internet connection open the Network Manager application and edit the Wired Connection.






 
 
Click on the IPv4 Settings tab and select the Method -  Shared to Other computers.

Once the above steps are complete reconnect the network to get the connectivity over the raspberry pi. 












Read rest of entry

07 September, 2010

Remote login using SSH and copying files from remote machines


copy files remotely over internt

SSH stands for “secure shell” and its a program and protocol also. Through SSH you can  use the applications that are available in a remote computer on internet even if you don't have it in local machine. Only requirement is a working internet connection and an account in the remote machine.  The OpenSSH program suite, developed by the OpenBSD project, offers a free SSH facility with everything necessary to use encrypted connections on different operating systems: 
  :: commandline tools for working on remote machines
  :: to execute programs remotely 
  :: to tunnel Internet services via SSH 
  :: tools for secure file copying

   OpenSSH is a must-have application in any recent Linux distribution. Most systems offer separate packages for the client and the server. Server program is necessary if you want to access your Linux computer via SSH from another machine. 

Applications . . .
- You can login to your office computer remotely from
   home and do all the office work @ home
- Using ssh tunnelling you can communicate over the
   restrictions imposed by proxies and firewalls 
Functions of SSH

ssh       :The command-line client establishes   
             encrypted connections to remote machines 
             and will run commands on these machines if
             needed.

scp      :To copy files (non-interactively) locally to or 
             from remote computers, you can use scp
             (“secure copy”).

sftp      :The ftp client (“secure ftp”) supports
             interactive copying. Like other command line
             ftp clients, the tool offers many other options
             such as copying, changing and listing 
             directories, modifying permissions, deleting
             directories and files, and more...

sshd     :The SSH server is implemented as a daemon
             and listens on port 22 by default. SSH clients 
             establish connections to the sshd.

Installation & Configuration

Take the terminal and type in following commands to install SSH

$ sudo apt-get install openssh-server openssh-client
 
Inorder to test ssh please type in the following command...

$ ssh localhost 
 
To stop ssh server, type in

$ sudo /etc/init.d/ssh stop

To start sshs server, type in

$ sudo /etc/init.d/ssh start

To restart ssh server, type in

 # sudo /etc/init.d/ssh restart


Remote login using SSH

You can remotely login to another machine on the internet by using the following command,

$ ssh  -X  username@100.100.100.3

Replace the username and ip (100.100.100.3) with the one corresponding to you. X option enables the Xserver.

                On executing the above command, the terminal prompt changes to user@remotemachine:~$  you can execute any command as if you are logged in at the remotemachine. Any application from that remote machines can be run by executing the command

examples :
user@remotemachine:~$ firefox
          for starting firefox on a remote machine
user@remotemachine:~$ nautilus
          for starting the file manager on remote  
           machine 
user@remotemachine:~$gnome-session
          to start the gnome session so that you get the   
          desktop with all the features, then you can 
          perform everything in graphical user 
          environment  


Copying files from remote system

                The ssh command alone allows remote login only, but you can copy a file in a remote system to your local machine using the 'scp' command.

1. You are already logged in at user@local$

2. Login to the remote machine  using the ssh  
    command. Then the terminal prompt will change to 
    user@remote

3. Type in the scp command as follows

$ scp  filename user@ip_local:destination

               filename      :: the file to be copied which is 
                                      in remote machine
               ip_local        :: ip adress of your machine
               destination  :: destination folder where the 
                                     copied files are to be saved
       Then the terminal will prompt for your accounts password...


Thats all for now with ssh and scp. You can refer the man page of ssh and scp to see more details in case of using them under a proxy server and also for advanced features...






Read rest of entry

24 April, 2010

How to connect Windows XP to Ubuntu over LAN cable

                 This post is all about connecting Ubuntu and Windows system using a LAN cable for sharing data between them . . . A LAN cable is a preferable mechanism for sharing files in a good speed in the range of Mbps.

Connection requirements :
        LAN cable
        Ubuntu linux with Samba (or any other file sharing application)
        Windows machine

Connect LAN cable to both of the systems. On connecting both the Windows and Ubuntu try to connect automatically between each other.

Now follow the steps below... 

Configuring the Linux system


1.  Right click on the Network manager icon on the top sidebar. Select 
     "Edit  connections".

2.  Under the "wired" tab on the pop up Network connections window choose the
     "add" button to add a new connection.

3.  Make changes in the opened window as in figure

        # specify the connection name as u like. I call it "Ubuntu XP network"
        # Check the connect automatically box enabled
        # Click on the IPv4 settings
            * Click on the methode field and choose "Manual"
            * Click below the address feild and enter an arbitray ip say, 
               192.100.100.1                   ....you can choose it your own
            * Add 255.255.255.0 in the Netmask (no options for you, enter it as if)
        # click on the apply button to make the changes available.



4. That's all you need to do in Ubuntu machine.


Configuring the Windows system

1.  Open the Network Connections folder from Start ---> Network Connections

2.  Right click on the connection with the name "Local Area Connection" and 
     click on the properties


3.  Under the general tab select Internet Protocol(TCP/IP) and click 
     "properties"


4.  Choose 'Use the following IP address' and enter
        IP Address  :  192.100.100.3
        Subnet Mask :  255.255.255.0




5.  Press the OK button to complete the configuring.

            Thats all about configuration. Now restart the connection from the Ubuntu system using network manager (No need to pull out the cable physically)
Inorder to share a particular file from windows, right click on the file and select properties.In the properties window check the corresponding
feilds related to sharing under the "sharing" tab.

To access those files from Ubuntu system, goto Places ---> Network ---> Windows network
Read rest of entry
 

Terminal Diary | techblog Copyright © 2009 Gadget Blog is Designed by jintu jacob Powered by Blogger