Sponsored Content
Top Forums UNIX for Advanced & Expert Users Configured sftp still requires password Post 302178944 by curleb on Wednesday 26th of March 2008 04:10:26 PM
Old 03-26-2008
Tools

Let's step back a second and revisit the key pair that you'd generated. From your post:

Quote:
I used 'ssh-keygen -b 1024 -P "" -t dsa' to generate the Public-Key
Passphrase has apparently gained the misnomer of equal to the password, unfortunately. It's not, and it's intended to serve as a means to ensure public sharing of the key-pair without granting full account access to the remote host. Also, you don't need (or want) to specify your passphrase (ie, -P "") on the command-line, as it can be used against you, should anyone gain access to your key-pair and/or .sh_history file.

Instead of using -P (which is really intended to allow for revision of the passphrase in a given key-pair), let the ssh-keygen program prompt you for your passphrase. Leave all other switches as they are, but scratch the
Code:
-P ""

options. The program will prompt you for the empty passphrase..to which you'll just enter twice. It doesn't matter what key type you're creating either..same goes for rsa and dsa.

Lastly, just be sure that you're placing the Public Key into the remote user's .ssh directory as well. You don't have to have identical users between the machines..or even have separate machines for that matter (ie, unilover@localhost can access unilever@localhost, much the same as unilover@localhost can access unilever@remotehost or unilover@remotehost). So long as the key placement is done right..you can automate the login with an empty passphrase.

HTH
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SFTP error:-b requires an argument greater than zero

Hi when i execute the below command sftp -b ftpCommand.ksh remoteuser@remoterserver i am getting the error "-b requires an argument greater than zero" Please can any one help me. (1 Reply)
Discussion started by: vgs
1 Replies

2. Shell Programming and Scripting

SFTP error:-b requires an argument greater than zero

Hi when i execute the below command sftp -b ftpCommand.ksh remoteuser@remoterserver i am getting the error "-b requires an argument greater than zero" Please can any one help me. (4 Replies)
Discussion started by: vgs
4 Replies

3. Shell Programming and Scripting

Script check if ssh requires a password???

Thanks to the help from this forum i've learned a lot of good stuff but I still have questions :). I need to write a script that checks if ssh to a box requires a password. I need it will be an "if" statement, if ssh requires password, then do a key exchange(with i already have). Just need to... (5 Replies)
Discussion started by: elbombillo
5 Replies

4. Shell Programming and Scripting

password - SFTP

Hi team, I know if we need to transfer the files between between 2 servser, we use SFTP through key setup between 2 server. currently There are some problems and we are not able to setup keys between servers. How can i use password with SFTP for temporary solutions, so that the file... (6 Replies)
Discussion started by: Amit.Sagpariya
6 Replies

5. Shell Programming and Scripting

sftp is asking password

Hi i have generate public private key pair using command ssh-keygen -t rsa -b 2048 and then it made the two keys under the directory ~/.ssh ( in server 1) one is public key and another one is private .. i copied public one key onto my second server under the directory ... (22 Replies)
Discussion started by: aishsimplesweet
22 Replies

6. Shell Programming and Scripting

SFTP with Password

Hi Guys, I need to know how can i achieve SFTP "with" password in a shell script. I have already done passwordless key generation thing and it is working but at the moment i am interested in passing a password. And another question I have is say i have a.ksh and b.sh scripts...Can i invoke... (6 Replies)
Discussion started by: Arpit Narula
6 Replies

7. Red Hat

prompting for passwords even i configured ssh password less authentication

There are two servers : 1. Site 2. Testing from site server i want to connect testing server with ssh password less authentication. i generated public and private keys with ssh-keygen -t rsa on site server. cat id_rsa >> authorized_keys cat id_rsa.pub >> authorized_keys i... (15 Replies)
Discussion started by: rehantayyab82
15 Replies

8. Shell Programming and Scripting

SFTP prompting for password even though password is in script

Hi All, I am trying to transfer a file from one server to a remote server using SFTP. Client is not ready for key setup. I am working on Solaris 10. Here is the code. #!/bin/ksh # sample automatic Sftp script to dump a file USER="user1" PASSWORD="pass1" HOST="host1" sftp $USER@$HOST... (6 Replies)
Discussion started by: megha2525
6 Replies

9. Shell Programming and Scripting

Sftp with password

I have been tasked with scripting a sftp transfer from my clients sftp server to a vendor. I have been given a user name and password. This is an older OEL server, 5.2. I am not able to install any packages on this system. It does not have expect, ssh-pass, or any other ssh password helper... (6 Replies)
Discussion started by: mtrgoose
6 Replies
CKEYGEN(1)																CKEYGEN(1)

NAME
ckeygen - manipulate public/private keys SYNOPSIS
ckeygen [-b bits] [-f filename] [-t type] [-C comment] [-N new passphrase] [-P old passphrase] [-l] [-p] [-q] [-y] DESCRIPTION
The --help prints out a usage message to standard output. -b, --bits <bits> Number of bits in the key to create (default: 1024) -f, --filename <file name> Filename of the key file. -t, --type <type> Type of key (rsa or dsa). -C, --comment <comment> Provide a new comment. -N, --newpass <pass phrase> Provide new passphrase. -P, --pass <pass phrase> Provide old passphrase. -l, --fingerprint Show fingerprint of key file. -p, --changepass Change passphrase of private key file. -q, --quiet Be quiet. -y, --showpub Read private key file and print public key. --version Display version number only. DESCRIPTION
Manipulate public/private keys in various ways. If no filename is given, a file name will be requested interactively. AUTHOR
Written by Moshe Zadka, based on ckeygen's help messages REPORTING BUGS
To report a bug, visit http://twistedmatrix.com/bugs/ COPYRIGHT
Copyright (C) 2002-2011 Twisted Matrix Laboratories. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. SEE ALSO
ssh(1), conch(1) October 2002 CKEYGEN(1)
All times are GMT -4. The time now is 11:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy