Passing password in script for ssh connection - no except
Used the script posted on forum - unix.com/shell-programming-scripting/21597-script-change-passwords-same-user-multiple-servers.html but the last question posted on this seems to be still unanswered, tried different things with no success, can someone help giving an way to pass the password via script for ssh connection. Using except is not an option. We have more than 300 servers and need to setup an script to change password. Also setting up ssh public keys for password less communciation is not an option with these limitation, I am using following code, but it just waits on the password prompt. can someone help?
sapadmin
Last edited by radoulov; 07-22-2011 at 05:48 PM..
Reason: Code tags.
Hi,
Anybody help to write a shell script as below requirement.
script stops some costomized application services.
1. first it will stop apache as root
2. then it will switch to my application user and stop app service.
Note: passing password is required to stop app service as app... (1 Reply)
I have a requirement, I need to run a command at remote system using a ssh. Is there any way we can pass the username and password in shell script to the ssh command as we did it in one of the shell script for FTP.
ftp -n $i <<!EOF >>
user Username $PASSWD
cd /home/scripts
... (5 Replies)
The subject has been outlined in many articles, yet I can not establish a password-less ssh connection. Below I show what I did and then I include ssh debug info, maybe someone would be able to point out something I am not doing right.
My setup: two SCO 5.0.7 boxes on a private lan, user... (6 Replies)
Dear All,
I'm trying to configure a passwordless connection between two servers of HP-UX. i have srearched the configuration in google so many times and as per the guidence i have done all the steps, but still its not working and every time it is asking for password while trying to scp some file... (2 Replies)
How can I pass password in SSH command without using expect in a shell program.
I don't have expect installed on my Solaris server.
#!/bin/bash
ssh user@hotname (how to supply pass in script?:wall:)
Experts please help its very urgent.
Shrawan Kumar Sahu (4 Replies)
I want to do following 2 commands via script:
1) eval `ssh-agent`2) ssh-add /export/home/sufuser/.ssh/id_rsa When asked for passphrase enter "passwordpassword1234
but whenever I run the script it stucks after "ssh-add /export/home/sufuser/.ssh/id_rsa" command and asks fro... (4 Replies)
Hi Experts,
I have specific requirement where I want to pass the password with the ssh username@hostname command .
I dont want to use RSA public and private keys also. Because that will be on production server and no one wants to give access like that.
Second thing it is production... (14 Replies)
I have a script like this
#!/bin/bash
hello=$1
echo `hostname` $hello
ssh gtint16 "echo $hello"
if I run this as #script.sh "hello''", it prints only hello on that ssh session and not the single quotes, but locally its printing hello''. I want the single quotes also to be printed... (2 Replies)
Hi,
I want to validate ssh connection one after one for multiple servers..... password less keys already setup but now i want to validate if ssh is working fine or not...
I have .sh script like below and i have servers.txt contains all the list of servers
#/bin/bash
for host in $(cat... (3 Replies)
Discussion started by: sreeram4
3 Replies
LEARN ABOUT OSF1
delay
DELAY(9r)DELAY(9r)NAME
DELAY - General: Delays the calling routine a specified number of microseconds
SYNOPSIS
void DELAY(
int Specifies n );
ARGUMENTS
Specifies the number of microseconds for the calling process to spin.
DESCRIPTION
The DELAY routine delays the calling routine a specified number of microseconds. DELAY spins, waiting for the specified number of
microseconds to pass before continuing execution.
For example, the following code results in a 10000-microsecond (10-millisecond) delay:
.
.
.
DELAY(10000);
.
.
.
The range of delays is system dependent, due to its relation to the granularity of the system clock. The system defines the number of clock
ticks per second in the hz variable. Specifying any value smaller than 1 Hz to the DELAY routine results in an unpredictable delay. For any
delay value, the actual delay may vary by plus or minus one clock tick.
Using the DELAY routine is discouraged because the processor will be consumed for the specified time interval and therefore is unavailable
to service other processes. In cases where kernel modules need timing mechanisms, you should use the sleep and timeout routines instead of
the DELAY routine. The most common usage of the DELAY routine is in the system boot path. Using DELAY in the boot path is often acceptable
because there are no other processes in contention for the processor.
RETURN VALUES
None
SEE ALSO
Routines: sleep(9r), timeout(9r)DELAY(9r)