Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to pass password as a variable for sshpass authentication? Post 303034196 by sam@sam on Sunday 21st of April 2019 10:25:45 AM
Old 04-21-2019
How to pass password as a variable for sshpass authentication?

Using below below command i'm able to connect or authenticate server, In below command password contains special characters
Code:
sshpass -v  -p 'ASJBA%hs76)#' ssh -q -o ConnectTimeout=5 hostname

But If I pass password as a variable I'm not able to connect or authenticate server, can you please help me to fix this
Code:
sshpass -v  -p $password ssh -q -o ConnectTimeout=5 hostname

Code:
cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4

 

10 More Discussions You Might Find Interesting

1. Cybersecurity

Password Authentication

I would like to know how to validate an unix password from shell script (If is possible) Thanks very much ;) (3 Replies)
Discussion started by: juan_o_morillo
3 Replies

2. UNIX for Advanced & Expert Users

disallowing user/pass authentication in favor of a pure key system?

i finally got my key-pair system working... sort of a makeshift eToken system. however, i only want to allow this sytem for system access. i don't want to allow for the standard user/pass authentication system. right now i changed the following: # To disable tunneled clear text passwords,... (2 Replies)
Discussion started by: xyyz
2 Replies

3. UNIX for Advanced & Expert Users

AIX password authentication very slow

AIX password authentication very slow I installed and already removed openssh and our login on the aix box very slow. It takes 30 seconds to get the password authenticated. How can i debug this problem? and what might be the reason. It was working fine until i tried to get openssh... (0 Replies)
Discussion started by: progressdll
0 Replies

4. Solaris

Enhanced Password Authentication

Hello; I am moving a customer from Solaris 2.6 to Solaris 2.8. The customer has requested the following two requirements also be implemented: 1. Lock a user account out for X number of days after 3 unsuccessful login attempts. 2. No reuse of the last 5-10 passwords. Also referred to... (1 Reply)
Discussion started by: rambo15
1 Replies

5. Solaris

bypass password authentication for sftp in unix

I am using solaris unix 8.2 version. I want to bypass password authentication for sftp. Can you please give some ideas on this. thanks.Regards. (4 Replies)
Discussion started by: vijill
4 Replies

6. Solaris

can't bypass password authentication

I can able to SFTP from my web server unix to apps server unix end. but the other way from APPS server to Web server is still asking me the password. I have done same procedure both side. still i am having same problem. Any one help on this. thanks, regards (3 Replies)
Discussion started by: vijill
3 Replies

7. Shell Programming and Scripting

Password-less RSA Authentication not working

Hello Friends, I know this issue has been raised many times and hence I tried every resolution provided in the forum before I posted this issue again. My Password-less RSA authentication was working fine for quite some time. Whenever the remote server password used to change I used to re-do... (5 Replies)
Discussion started by: mehimadri
5 Replies

8. Solaris

Unable to login password less authentication

Hi, I am facing strange problem in solaris 10. My requirement is that on server A using user test, any user which is created on Server B will be able to login wihtout password (ssh) from Server A All the users which are on Server B are able able to login from Server A using test user. ... (8 Replies)
Discussion started by: manoj.solaris
8 Replies

9. Red Hat

How to pass value of pwd as variable in SED to replace variable in a script file

Hi all, Hereby wish to have your advise for below: Main concept is I intend to get current directory of my script file. This script file will be copied to /etc/init.d. A string in this copy will be replaced with current directory value. Below is original script file: ... (6 Replies)
Discussion started by: cielle
6 Replies

10. UNIX for Dummies Questions & Answers

SSH Keys Authentication keeps asking for password

Hi! Im trying to set access from ServerA(SunOS) to ServerB(Some custom Linux with Keyboard Interactive login) with SSH Keys. As a proof of concept I was able to do it between 2 virtual machines. Now in my real life scenario it isnt working. I created the keys in ServerA, copied them to... (7 Replies)
Discussion started by: RedSpyder
7 Replies
condor_store_cred(1)					      General Commands Manual					      condor_store_cred(1)

Name
       condor_store_cred securely - stash a password

Synopsis
       condor_store_cred [-help]

       condor_store_credadd[ -c | -u username] [-p password] [-n machinename] [-f filename]

       condor_store_creddelete[ -c | -u username] [-n machinename]

       condor_store_credquery[ -c | -u username] [-n machinename]

Description
       condor_store_credstores passwords in a secure manner. There are two separate uses of condor_store_cred:

	  1.  A  shared  pool  password  is needed in order to implement the  PASSWORD authentication method. condor_store_cred using the -coption
	  deals with the password for the implied  condor_pool@$(UID_DOMAIN) user name.

	  On a Unix machine, condor_store_cred with the -foption is used to set the pool password, as needed when used with the  PASSWORD  authen-
	  tication method. The pool password is placed in a file specified by the  SEC_PASSWORD_FILE configuration variable.

	  2. In order to submit a job from a Windows platform machine, or to execute a job on a Windows platform machine utilizing the run_as_own-
	  erfunctionality, condor_store_cred stores the password of a user/domain pair securely in the Windows registry. Using this  stored  pass-
	  word,  Condor  may act on behalf of the submitting user to access files, such as writing output or log files. Condor is able to run jobs
	  with the user ID of the submitting user. The password is stored in the same manner as the system does when setting or  changing  account
	  passwords.

       Passwords are stashed in a persistent manner; they are maintained across system reboots.

       The  addargument on the Windows platform stores the password securely in the registry. The user is prompted to enter the password twice for
       confirmation, and characters are not echoed. If there is already a password stashed, the old password will be overwritten by the new  pass-
       word.

       The deleteargument deletes the current password, if it exists.

       The queryreports whether the password is stored or not.

Options
       -c

	  Operations refer to the pool password, as used in the  PASSWORD authentication method.

       -f filename

	  For Unix machines only, generates a pool password file named filenamethat may be used with the  PASSWORD authentication method.

       -help

	  Displays a brief summary of command options.

       -n machinename

	  Apply the command on the given machine.

       -p password

	  Stores password, rather than prompting the user to enter a password.

       -u username

	  Specify the user name.

Exit Status
       condor_store_credwill exit with a status value of 0 (zero) upon success, and it will exit with the value 1 (one) upon failure.

Author
       Condor Team, University of Wisconsin-Madison

Copyright
       Copyright  (C)  1990-2012  Condor  Team,  Computer  Sciences Department, University of Wisconsin-Madison, Madison, WI. All Rights Reserved.
       Licensed under the Apache License, Version 2.0.

       See the Condor Version 7.8.2 Manualor http://www.condorproject.org/licensefor additional notices. condor-admin@cs.wisc.edu

								  September 2012					      condor_store_cred(1)
All times are GMT -4. The time now is 10:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy