Sponsored Content
Top Forums UNIX for Dummies Questions & Answers [SSH-RSA] Still prompting for password after generating keys Post 302756201 by fzd on Tuesday 15th of January 2013 11:25:22 AM
Old 01-15-2013
[Solved] [SSH-RSA] Still prompting for password after generating keys

Hello,
I'm trying to perform these operations without entering any password, as user "fzd":
Code:
fzd@machine1> scp /tmp/srcFile1 fzd@machine2:/tmp/$destFile
fzd@machine1> scp fzd@machine2:/tmp/$srcFile /tmp/$destFile

but also
Code:
fzd@machine1> scp /tmp/srcFile1 machine2:/tmp/$destFile
fzd@machine1> scp machine2:/tmp/$srcFile /tmp/$destFile

So, in order to do this, I performed (I'm only using these two machines, so there's no real trouble in removing the .ssh contents):
Code:
0.a - fzd@machine1> rm -rf $HOME/.ssh
0.b - fzd@machine2> rm -rf $HOME/.ssh /tmp/id_rsa.pub
1 - fzd@machine1> ssh-keygen -t rsa [Enter, Enter, Enter]
2 - fzd@machine1> scp $HOME/.ssh/id_rsa.pub fzd@machine2:/tmp
3 - fzd@machine2> mkdir $HOME/.ssh
4 - fzd@machine2> cat /tmp/id_rsa.pub >> $HOME/.ssh/authorized_keys
5 - fzd@machine2> chmod -R 700 $HOME/.ssh
6 - fzd@machine1> chmod 600 $HOME/.ssh/id_rsa*
7 - fzd@machine2> rm /tmp/id_rsa.pub

However, when running any of these:
Code:
fzd@machine1> ssh fzd@machine2
fzd@machine1> ssh machine2
fzd@machine1> ssh -l fzd machine2
fzd@machine1> scp /tmp/$srcFile fzd@machine2:/tmp/$destFile
fzd@machine1> scp /tmp/$srcFile machine2:/tmp$destFile
fzd@machine1> scp fzd@machine2:/tmp/$srcFile /tmp/$destFile
fzd@machine1> scp machine2:/tmp/$srcFile /tmp/$destFile

I get prompted each time for a password ("fzd@machine2's password:")

Have I skipped something obvious?

I tried to find as much help on this (and other) websites, but almost everyone stopped at step 4 above, some went all the way down to step 6, after the chmods)

("ssh -V" returns, on both machines, "OpenSSH_3.6.1p2, SSH protocols 1.5/2.0, OpenSSL 0x009071f)

Thanks!
fzd

[EDITS: formatting]

Last edited by fzd; 01-16-2013 at 05:18 AM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SSH - Prompting for password

Hi, Can anybody tell me a way to do ssh , without prompting for password from keyboard, Using RSA. The requirement is I need to create the key , using passphrase also..... Is there any way to do it in UNIX ? I am doing it from AIX machine , but remote machine is Linux I tried... (8 Replies)
Discussion started by: shihabvk
8 Replies

2. UNIX and Linux Applications

SSH: Avoiding password prompt with rsa key generation

Hi, I am using a remote storage service for backing up our data - we want to have a script run as part of a cron job which would do the backups from our local Linux machine to the service's Linux machine. I want to use tar and ssh to do this (rather than mounting the disk and using cp) .... (5 Replies)
Discussion started by: same1290
5 Replies

3. UNIX for Dummies Questions & Answers

SSH with RSA keys - error contacting the authentication agent

Hi all, Basic Requirement: To SFTP large files (usually 10GB). We use webMethods 6.1.2 (installed on Unix) as the orchstrator and make underlying Unix system calls to do the processing. That is, if we have to SFTP a large file - webMethods will invoke a Perl script on the underlying Unix... (2 Replies)
Discussion started by: sandeeppotdar
2 Replies

4. AIX

While trying to do ssh without password, rsa key file is created as empty.

Hi i have aix 5.3 operating system, and i am trying to do ssh without passwd, when i tried to create a rsakey, it produces empty file as an output, how can solve that problem? why it is giving empty output file, i tried with different user, situation same,.i have restarted sshd server. .ssh... (2 Replies)
Discussion started by: nibiru78
2 Replies

5. Programming

ssh via java prompting for password

Hi, I have set up my remote server for password-less login via ssh. If I run the command on my server - ssh user@remoteserver "ls -l" I get an output, but when I try to do this via java String sCmd = new String{"/usr/bin/ssh", " user@remoteserver", "\"ls -l\""}; Process p =... (3 Replies)
Discussion started by: nrworld
3 Replies

6. UNIX and Linux Applications

Running RMAN backups from grid control but using oracle account with rsa keys vs a password ?

I'm a sysadmin trying to help out one of our DBA's setup the RMAN backups (Oracle 11g on rhel5 ) so they can schedule and control them from the OEM grid control. But we want the oracle user to use ssh keys instead of a password. I have the working rsa keys in place for the user but the GUI seems to... (0 Replies)
Discussion started by: samael00
0 Replies

7. Fedora

Problem while generating ssh keys.

Hi all, I am facing an issue while creating the ssh keys. i am using fedora 9 Please let me know how to solve this issue # ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no... (5 Replies)
Discussion started by: kalyankalyan
5 Replies

8. UNIX for Advanced & Expert Users

Need Password-Less ssh with RSA-VPN

We have RSA SecureID softtoken key generator on my Windows machine. It generates new keys every 1 minute. Any HPUX server (be it ServerD or ServerP) requires my ID and the randomly generated RSA SecureID softtoken key from my Windows to login. I login to ServerD. Then I run a script... (0 Replies)
Discussion started by: mohtashims
0 Replies

9. 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

10. Shell Programming and Scripting

Ssh is prompting for password

Hi, When i am trying to connect to other server using ssh coomand, it is prompting for password. But i want to hardcode it with username so that it should not prompt for password. And i dont want to use "ssh-keygen" method as it is not allowed. Please help me. Regards, Mukta (7 Replies)
Discussion started by: Mukta
7 Replies
ONEUSER(1)					      oneuser(1) -- manages OpenNebula users						ONEUSER(1)

NAME
oneuser SYNOPSIS
oneuser command [args] [options] OPTIONS
-r, --read-file Read password from file --sha1 The password will be hashed using the sha1 algorithm --ssh SSH Auth system --x509 x509 Auth system for x509 certificates -k, --key path_to_private_key_pem Path to the Private Key of the User -c, --cert path_to_user_cert_pem Path to the Certificate of the User --driver driver Driver to autehnticate this user --x509_proxy x509 Auth system based on x509 proxy certificates --proxy path_to_user_proxy_pem Path to the user proxy certificate --time x Token duration in seconds, defaults to 3600 (1 h) -l, --list x,y,z Selects columns to display with list command -d, --delay x Sets the delay in seconds for top command -x, --xml Show the resource in xml format -n, --numeric Do not translate user and group IDs -v, --verbose Verbose mode -h, --help Show this message -V, --version Show version and copyright information COMMANDS
o create username [password] Creates a new User Examples: oneuser create my_user my_password oneuser create my_user -r /tmp/mypass oneuser create my_user --ssh --key /tmp/id_rsa oneuser create my_user --ssh -r /tmp/public_key oneuser create my_user --x509 --cert /tmp/my_cert.pem valid options: read_file, sha1, ssh, x509, key, cert, driver o update userid Launches the system editor to modify and update the template contents o login username Creates the Login token for authentication Examples: oneuser login my_user --ssh --key /tmp/id_rsa --time 72000 oneuser login my_user --x509 --cert /tmp/my_cert.pem --key /tmp/my_key.pk --time 72000 oneuser login my_user --x509_proxy --proxy /tmp/my_cert.pem --time 72000 valid options: ssh, x509, x509_proxy, key, cert, proxy, time o key Shows a public key from a private SSH key. Use it as password for the SSH authentication mechanism. valid options: key o delete range|userid_list Deletes the given User o passwd userid [password] Changes the given User's password valid options: read_file, sha1, ssh, x509, key, cert, driver o chgrp range|userid_list groupid Changes the User's main group o chauth userid [auth] [password] Changes the User's auth driver and its password (optional) Examples: oneuser chauth my_user core oneuser chauth my_user core new_password oneuser chauth my_user core -r /tmp/mypass oneuser chauth my_user --ssh --key /home/oneadmin/.ssh/id_rsa oneuser chauth my_user --ssh -r /tmp/public_key oneuser chauth my_user --x509 --cert /tmp/my_cert.pem valid options: read_file, sha1, ssh, x509, key, cert, driver o list Lists Users in the pool valid options: list, delay, xml, numeric o show [userid] Shows information for the given User valid options: xml ARGUMENT FORMATS
o file Path to a file o range List of id's in the form 1,8..15 o text String o groupid OpenNebula GROUP name or id o userid OpenNebula USER name or id o userid_list Comma-separated list of OpenNebula USER names or ids o password User password LICENSE
OpenNebula 3.4.1 Copyright 2002-2012, OpenNebula Project Leads (OpenNebula.org) Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 April 2012 ONEUSER(1)
All times are GMT -4. The time now is 01:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy