Thanks grial. It is odd indeed. I had tried rsa before dsa and here is the outcome of the re-try:
debug1: send SSH2_MSG_SERVICE_REQUEST
debug1: got SSH2_MSG_SERVICE_ACCEPT
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying public key: /home/testuser/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Trying public key: /home/testuser/.ssh/id_dsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
testuser@rmt_srvr's password:
very strange. Try cleaning up the keys file on the remote end.
1. move the .ssh/authorized_keys file out of the way (rename it to something).
2. scp the public backover
3. on the remote end rename the public key you just scp'd over to be .ssh/authorized_keys
4. logout and try again
On my system (OpenSSH_4.7p1, OpenSSL 0.9.8g 19 Oct 2007 on Archlinux testing to OpenSSH.4.3.p2_Debian-9 on Debian Etch) I get the following:
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/chris/.ssh/identity
debug1: Trying private key: /home/chris/.ssh/id_rsa
debug1: Offering public key: /home/chris/.ssh/id_dsa
debug1: Server accepts key: pkalg ssh-dss blen 435
debug1: read PEM private key done: type DSA
debug1: Authentication succeeded (publickey).
I assume the different messages are just because of different versions, possibly.
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
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.
No, only the .pub file goes to the remote location..you cat it into the ~/.ssh/authorized_keys file and scratch the original .pub file.
One thing I'd caution you on..and many of the SAs I deal with can't quite grasp: are you sudo or sesu or similar while trying to do any of this? This throws off the EID of the process and SSH won't let on, for obvious reasons.
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)
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)
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)
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)
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)
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)
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)
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)
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)