Results 1 to 3 of 3

Thread: remote log in to a system

  1. #1
    Join Date
    Oct 2009
    Beans
    4

    remote log in to a system

    Hi All
    I need a script for remote login into a system . during run time it should ask Ip address login id and password of a system i need to login. I'm new bee to linux. Can any one help me.
    i tried like

  2. #2
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,278
    Distro
    Kubuntu

    Re: remote log in to a system

    sshlogin:
    Code:
    #!/bin/bash
    
    read -p "Enter the IP address of remote system: " IP
    read -p "Enter the User Id: " UserID
    
    ssh $UserID@$IP     # ssh will prompt for a password
    To run the program:
    Code:
    $ chmod +x sshlogin
    
    $ ./sshlogin

  3. #3
    Join Date
    Oct 2009
    Beans
    4

    Re: remote log in to a system

    Quote Originally Posted by dwhitney67 View Post
    sshlogin:
    Code:
    #!/bin/bash
    
    read -p "Enter the IP address of remote system: " IP
    read -p "Enter the User Id: " UserID
    
    ssh $UserID@$IP     # ssh will prompt for a password
    To run the program:
    Code:
    $ chmod +x sshlogin
    
    $ ./sshlogin
    Thank u very much.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •