Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
I would like to only type the ip into my terminal and it should autossh into that server, is this possible? ex [vikrant.r@localhost tasks]$ 192.168.2.15 -enter should log me into ...
  1. #1
    Just Joined!
    Join Date
    Oct 2006
    Location
    Mumbai,India
    Posts
    81

    Question autossh by just typing the ip

    I would like to only type the ip into my terminal and it should autossh into that server, is this possible?

    ex
    [vikrant.r@localhost tasks]$ 192.168.2.15 -enter should log me into the server

  2. #2
    Linux Newbie raghaven.kumar's Avatar
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    209
    You can do

    Code:
    ssh-keygen -t dsa
    at the destination login user@system which will create two files in the user's home folder in ~/.ssh/.

    Copy the contents of the .pub file into your system, at your home folder
    inside file
    ~/.ssh/authorized_keys

    thats all

    you can login using just
    ssh <ip>

  3. #3
    Just Joined!
    Join Date
    Oct 2006
    Location
    Mumbai,India
    Posts
    81
    i dont want to type ssh i just want to type the ip and it shld login

  4. #4
    Linux Enthusiast likwid's Avatar
    Join Date
    Dec 2006
    Location
    MA
    Posts
    649
    create a shell that is just an ssh prompt, other than that I can't think of anything.

  5. #5
    Just Joined!
    Join Date
    Oct 2006
    Location
    Mumbai,India
    Posts
    81
    any other suggestions perhaps? besides creating a shell

  6. #6
    Linux Newbie Sangal-Arun's Avatar
    Join Date
    May 2006
    Location
    Gurgaon, India + Denver Colorado USA
    Posts
    101
    Quote Originally Posted by vikrant_me View Post
    any other suggestions perhaps? besides creating a shell

    other way is simply to add an alias in your bashrc file i.e.
    alias 57.7.111.111='rsh 57.7.111.111'

    now, just give 57.7.111.111 at $ prompt and you will be in. You can also specify ssh instead of rsh but that will require passwd to login to that box. If you even don't want to enter the passwd, research on Raghwan's hint.
    Brgds,

    ARUN SANGAL
    SCM: 1- 720 251 9962
    Email: sangal.ak04@gmail.com
    Email: sangal_ak04@yahoo.com

  7. #7
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    Right. Pubkey authentication + an alias...

  8. #8
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    is it really that much extra work to type ssh before the ip?

  9. #9
    Linux Newbie raghaven.kumar's Avatar
    Join Date
    Mar 2008
    Location
    Bangalore, India
    Posts
    209
    he needs to save characters for future use !!

  10. #10
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    I think that the zsh shell can run *any* file by just typing its name (it will run the correct application and open the file).

    Opening an ip is not quite the same, but maybe some zsh guru around here knows of a way to do this, in case it's even possible, which I don't really know.

Page 1 of 2 1 2 LastLast

Posting Permissions

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