Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18

Thread: Any SSH client which can store 100's of login profile?

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Any SSH client which can store 100's of login profile?

    Is there any SSH client like putty which can store 100's of login profiles. We don't have to type username password each time we want to access some ip.
    Tnx

  2. #2
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,371
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    Do you want client under Linux/UNIX or Windows? Under Linux you can write a shell script to do the same. Let me know so that I can give you some suggestions.
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  3. #3
    Junior Member
    Join Date
    Nov 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Vivek,
    I am looking for linux only. We need to store multiple username passwords of SSH.
    Can you please suggest something.
    Tnx

  4. #4
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,371
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    I’ve two solutions for you. Here is my shell script:
    Solution # 1 Shell script
    sshconnect.sh
    Code:
    #!/bin/bash
    PROFILES=~/.ssh.profiles
    aindex=1
    hosts=( null )
    # read array
    function readHosts(){
     exec 3<&0
     exec 0<$PROFILES
     while read line
     do
        rline=$(echo $line | egrep -v "^#" | sed '/^$/d')
        if [ "$rline" != "" ]; then
            user=$(echo "$rline" |  awk -F'|' '{ print $1}')
            ip=$(echo "$rline" |  awk -F'|' '{ print $2}')
            port=$(echo "$rline" |  awk -F'|' '{ print $3}')
            [ "$port" == "" ] && port=22 || :
            hosts[$aindex]=$(echo "ssh -p$port $user@$ip")
            aindex=` expr $aindex + 1 `
        fi
     done
     exec 0<&3 
    }
    # display choice and connect to server
    function displayHosts(){
      echo "------------------------------------"
      echo "Sr# : SSH Server Host Name"
      echo "------------------------------------"
      for (( i=1; i<$aindex; i++ ))
      do
            echo "#$i : ${hosts[$i]}"
      done
      read -p "Enter host number: " myHostNumber
      echo "Connecting to ${hosts[$myHostNumber]} ..."
      ${hosts[$myHostNumber]}
    }
    
    readHosts
    displayHosts
    Above is my script
    ~/.ssh.profiles file - stores SSH Username | IP and Optional port number:
    Code:
    #format USER|IP|Port
    usr1|192.168.1.1|22
    usr2|192.168.1.2
    usr3|192.168.1.3
    vivek|vpn.nixcraft.in|555
    All you have to do is copy above two files and customize ~/.ssh.profiles file and run script as follows:
    Code:
    chmod +x sshconnect.sh
    Run as
    Code:
    ./sshconnect.sh
    You will get
    Code:
    ------------------------------------
    Sr# : SSH Server Host Name
    ------------------------------------
    #1 : ssh -p22 usr1@192.168.1.1
    #2 : ssh -p22 usr2@192.168.1.2
    #3 : ssh -p22 usr3@192.168.1.3
    #4 : ssh -p555 vivek@vpn.nixcraft.in
    Enter host number: 4
    Connecting to ssh -p555 vivek@vpn.nixcraft.in ...
    Solution # 2 GUI tools
    If you want GUI tool i recommend gpass; see image below. You can just select host and connect it




    It is upto you which solution you want to use. See Linux password manager that also works under Windows / OS X | nixCraft
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  5. #5
    Junior Member
    Join Date
    Nov 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Thanks for the info but anything which can work in windows desktop? All I see is linux based

  6. #6
    Member
    Join Date
    Jul 2005
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Vivek,

    Does your script store the passwords too?. I think he asked for something which can store the password too.

    Is this possible with the script that you provided?

    Apart from this, this is a useful script. Is this put up in your blog and tips& tricks section?.

    ricc

  7. #7
    Never say die nixcraft's Avatar
    Join Date
    Jan 2005
    Location
    BIOS
    Posts
    4,371
    Thanks
    17
    Thanked 754 Times in 496 Posts
    Rep Power
    10

    Default

    Quote Originally Posted by deltamails View Post
    Thanks for the info but anything which can work in windows desktop? All I see is linux based
    Quote Originally Posted by ricc View Post
    Does your script store the passwords too?. I think he asked for something which can store the password too.
    You can use gpass to store both username and password; script can be modified to store password as well but which is bit risky as it will be in a plain text format No it is not there is tips and tricks section

    For windows desktop putty is good and I think Putty also works under Linux tooo http://the.earth.li/~sgtatham/putty/latest/putty-0.60.tar.gz just download compile the same or just use apt-get command to install putty under Linux
    Code:
    apt-get install putty
    All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]


  8. #8
    Junior Member
    Join Date
    Nov 2006
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Vivek,
    Thanks but I am using putty for years and its good. I am looking something for windows OS which can store the details
    I appreciate your time and reply but it's not solving my purpose.

    Thanks

  9. #9
    Junior Member
    Join Date
    May 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    Try Penguinet Silicon Circus - PenguiNet - Windows SSH Client I use it on Windows the cost is low and they have a 30 day trial. It will do what you are asking.

  10. #10
    Junior Member jesse's Avatar
    Join Date
    Aug 2007
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default

    You can start putty with several parameters (create a link):

    e.g.
    Code:
    putty.exe -l myuser -pw mypassword -load "mysession"

    there are more parameters available. just take a look at the docs.

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Parse XML file and store data in array in shell scripting
    By Nishanthhampali in forum Shell scripting
    Replies: 7
    Last Post: 2nd May 2010, 02:26 PM
  2. Vpn client
    By zafar466 in forum Ubuntu / Debian
    Replies: 0
    Last Post: 26th February 2008, 02:12 PM
  3. Replies: 1
    Last Post: 15th November 2007, 10:43 AM
  4. Replies: 0
    Last Post: 12th June 2007, 02:35 AM
  5. Ldap profile
    By kasimani in forum Linux software
    Replies: 0
    Last Post: 27th October 2006, 12:13 AM

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41