This is a discussion on Any SSH client which can store 100's of login profile? within the Linux software forums, part of the Linux Getting Started category; Is there any SSH client like putty which can store 100's of login profiles. We don't have to type username ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
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 |
| Sponsored Links | ||
|
|
|
||||
|
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
~/.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 Code:
chmod +x sshconnect.sh Code:
./sshconnect.sh 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 ... 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 |
|
|||
|
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 |
|
||||
|
Quote:
Quote:
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 Code:
apt-get install putty |
|
|||
|
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.
|
|
||||
|
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. |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vpn client | zafar466 | Ubuntu / Debian | 0 | 02-26-2008 02:12 PM |
| Parse XML file and store data in array in shell scripting | Nishanthhampali | Shell scripting | 5 | 02-14-2008 11:57 AM |
| dovecot: pop3-login: pop3-login: error while loading shared libraries: libsepol.so.1 | raj | Mail Servers | 1 | 11-15-2007 10:43 AM |
| Linux / UNIX set increase the number of failed login retries with SSH client | sweta | Getting started tutorials | 0 | 06-12-2007 02:35 AM |
| Ldap profile | kasimani | Linux software | 0 | 10-27-2006 12:13 AM |