Sponsored Content
Top Forums Shell Programming and Scripting FTP command line username and password passing Post 302428571 by bsnithin on Thursday 10th of June 2010 09:23:10 AM
Old 06-10-2010
This will work
Code:
#!/bin/bash
cd /export/home/xjanptak/bin/roaming/filijank/test/cookrie/
sqlplus testing/testing123 @cookrie.sql
sqlplus testing/testing123 @refresh.sql
ssh aslmuat3@s1tstd31 << EOF
cd /export/home/aslmuat3/bin
ls
exit
EOF

-Nithin
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

setting username and password for ftp

hi, i have set up an FTP server in one of our systems. could some one tell me the procedure to set up the username and password for it to enable other users to access the server. thanks (1 Reply)
Discussion started by: div
1 Replies

2. Solaris

I want to hard code username and password for an FTP connection

Hi all i want to do FTP via running a shell script and i want to hard code username and password for that particular server.. by writing it in a file can u help me in this regard.. Thank u Naree (2 Replies)
Discussion started by: naree
2 Replies

3. UNIX for Dummies Questions & Answers

FTP Download username and password

I am trying to download from ftp server (rsync and postfix). But every time I connect to the ftp server, it prompts for USER and PASS but I don't know which username and and password to use. And I am using command based UNIX OS. (2 Replies)
Discussion started by: kumarrana
2 Replies

4. Shell Programming and Scripting

in ftp how to avoid username/password

hi all i am very new to unix. we had the below scenior test.bat file which contains ftp -s:logfiles.scr servername logfiles.scr contains username password cd path get file bye We had n number of batch(.bat files). which is having the same kind of scr file pointing... (10 Replies)
Discussion started by: nh1
10 Replies

5. Shell Programming and Scripting

passing password to a command

Hi all, I have the expect binaries in our boxes.. I want to pass a passwd to a command automatically without manual intervention using "/<path_of_expect>/expect/<version>/bin/autopasswd" The below command will ask passwd in my script cleartool rmtag -all <vob_tag> #Some... (4 Replies)
Discussion started by: raghu.iv85
4 Replies

6. Shell Programming and Scripting

Passing username and password to a script running inside "expect" script

Hi I'm trying to run a script " abc.sh" which triggers "use.sh" . abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script. Please find below the scripts: #abc.sh #!/usr/bin/expect -f exec /root/use.sh expect "*name*" send... (1 Reply)
Discussion started by: baddykam
1 Replies

7. Shell Programming and Scripting

Logging in with Username/Password on one line

Hello, I am currently working on a project that requires me to remote login into another UNIX system using different credentials. The problem is that progamatically I cannot simply feed the password into the UNIX system. Is there a way to feed the password within one command line statement. I... (1 Reply)
Discussion started by: myoung88
1 Replies

8. OS X (Apple)

OSX verify username and password in one line

I'm writing a script that has the need to verify the current user's username and password. I'm not entirely sure how to do this. I've read some things on "dscl" but am not sure that's the correct route for me to go. The one condition i have is that i really need to have the verification happen... (4 Replies)
Discussion started by: TheDrizzle
4 Replies

9. Shell Programming and Scripting

Passing password with SSH command

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)
Discussion started by: sharsour
14 Replies

10. Shell Programming and Scripting

Passing Username & password through shell script to java code

Hi, I have a shell script (script.sh) in which we are calling java code which asks for Username: Password: for authentication purpose currently we are passing the credential manually and run the script. but I am trying echo -e "user_id\npassword" | script.sh but its not... (1 Reply)
Discussion started by: rakeshtomar82
1 Replies
UPSRW(8)						      Network UPS Tools (NUT)							  UPSRW(8)

NAME
upsrw - UPS variable administration tool SYNOPSIS
upsrw ups upsrw -h upsrw -s variable [-u username] [-p password] ups DESCRIPTION
upsrw allows you to view and change the read/write variables inside your UPS. It sends commands via the server upsd(8) to your driver, which configures the hardware for you. The list of variables that allow you to change their values is based on the capabilities of your UPS equipment. Not all models support this feature. Typically, cheaper hardware does not support any of them. Run upsrw with a UPS identifier to see what will work for you. OPTIONS
-h Display the help message. -s variable Specify the variable to be changed inside the UPS. For unattended mode such as in shell scripts, use the format VAR=VALUE to spec- ify both the variable and the value, for example: -s HIGHXFER=129 Without this argument, upsrw will just display the list of the variables and their possible values. Some variables are strings, and can be set to any value within the length limit. Others are enumerated types and can only be set to one of those values. Refer to the list to know what's available in your hardware. -u username Set the username for the connection to the server. This is optional, and you will be prompted for this when using the -s option if you don't specify -u on the command line. -p password Set the password to authenticate to the server. This is also optional like -u, and you will be prompted for it if necessary. ups View or change the settings on this UPS. The format for this option is [upsname@]hostname[:port]. UNATTENDED MODE
If you run this program inside a shell script or similar to set variables, you will need to specify all of the information on the command line. This means using -s VAR=VALUE, -u and -p. Otherwise it will put up a prompt and your program will hang. This is not necessary when displaying the list, as the username and password are not required for read-only mode. DIAGNOSTICS
upsrw can't set variables on your UPS unless you provide a valid username and password. If you get "access denied" errors, make sure that your upsd.users(5) has an entry for you, and that the username you are using has permissions to SET variables. HISTORY
This program used to be called upsct2, which was ambiguous and confusing. SEE ALSO
upsd(8), upscmd(8) Internet resources: The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/ NUT mailing list archives and information: http://lists.exploits.org/ Sat Aug 31 2002 UPSRW(8)
All times are GMT -4. The time now is 08:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy