Sponsored Content
Operating Systems Linux Ubuntu Passwordless ssh authentication fails Post 302735267 by frappa on Saturday 24th of November 2012 04:00:37 AM
Old 11-24-2012
Hi tkota:

1. the sshd_config files seems ok, I don't think you should edit it.

2. check for correct permissions on the server-side ~/.ssh directory of the user you are going to login with; they should be:
700 (rwx --- ---) for ~/.ssh directory
600 (rw- --- ---) for all the files inside ~/.ssh directory

3. please check that the public key you are using to perform passwordless authentication is correctly stored in server-side file ~/.ssh/authorized_keys
The format of the key should be something like:
Code:
ssh-rsa hkbvfggkwbugjbvwulbvgawDDHSFYGFVDKJCBK+89u8aunLJDBHUOGHzwyZK4PpmV1cA4D/l3WbjNKLWGN/ERWGPWMBVFI9PWHJVWERIQVH80H80WERHVQWRV+M0vbqQPnj/EkJ0HpF5xAxOEcYlb57GNV/5CKjai9z1DFIUaeJM8vj+f1ztDcj71s6vIw5Vm5EA+gk2Vj4siYhg08NUtCrdRWmFgmaf2wM0MrblJtbzeeOLwcWVyQzDpxLlhqpA76mgpO0TvALJJOHWw/+/GFUWET76T893T45GI2GD67WTgyd789g34ibgrifh0peh34n2f+f2jh0cbhkjb98gTFVCXDUCCFYKGILYPYPghkbfhkbwekfwe8ebncfwhc8o0wechppenc2q0pj+mknbn0B4pA9XJkvrD2Zi+pdV8U3nuTTUZTAysXdN8dV/xV3s6W9ENHhVulNZ5vmerWmAAvm1OBH0jPWipDagPhBZ1c+WVPDmYLbWKTGHTsOfDH0/+JFc8zCgtxkz10Z8x6efRjTQMkl6T988YlLAeBhRtPQ/of5mJ9kKOg4Ynyc9uHv+gY48VkpUoQQUGjkGOjMYQ4PR/tkQE6xqaOAEhWN79oys2R47f36aCkKOd7S8hxJ7AauMSCpBg/+3ClTeX8VdUsUZhAWtKwacicBVlQuSyUBByh2JhJkQX2fPsxF5uf9fOcl9hac= user@remotehost

be aware that the newlines in public key are just a consequence of the fact that the text may be wrapped by the text editor/viewer: the key itself should not contain newline characters (sometimes ssh_keygen on windows may produce weird output results).
For the same reason, if you generated the key pair on a windows machine, make sure to sanitize the content of the private and public key in order to comply with the server newline standard (see for example 'man dos2unix').

4. when invoking ssh on the client, please remember to specify the user to login with and try to explicitly indicate the private key you want to use in order to authenticate (using the -i switch of ssh).

see ya
fra
 

10 More Discussions You Might Find Interesting

1. AIX

Passwordless authentication via SSH

I am trying to implement passwordless authentication via ssh2. I have used the well documented technique of generating a key pair with a blank passphrase on my client machine, and installing the public key on the destination server (AIX 5.3) in the user's .ssh2 directory. I have used this technique... (1 Reply)
Discussion started by: RegX
1 Replies

2. AIX

Passwordless root authentication via SSH

Hello, I would like to issue a couple of commands as root on a remote machine without having to enter the root password. I used "ssh-keygen -t rsa" to generate the encryption keys, copied the public key to the remote machine, etc. I also tried playing around with the sshd_config file and... (3 Replies)
Discussion started by: sphericon
3 Replies

3. HP-UX

Help on passwordless ssh...

Hi, Can someone help me on ssh-keygen usage...? I used ssh-keygen after which "id.pub" file was generated in system1's > .ssh directory... I copied the same into the remote system system2 > .ssh directory as "authorized_keys" file. Now i tried ssh connection from system 1 to system... (7 Replies)
Discussion started by: EmbedUX
7 Replies

4. Shell Programming and Scripting

passwordless authentication of SFTP script

Dear All I need to discuss about the problem which has been discussed so many times here. I need to transfer a file from server A to server B via passwordless SFTP script. By reading the threads on this topic here, I followed the below steps but still it's not working .. Pls find the steps... (13 Replies)
Discussion started by: uday.shankar
13 Replies

5. Shell Programming and Scripting

Setup multiple passwordless authentication

I have experience in setting up passwordless authentication by sharing ssh public keys manually.Currently I am in the process to the write a script to perform the same functionality from one source(host) to multiple destinations. I have one source host (Host A) whose public keys has to be shared... (9 Replies)
Discussion started by: Lancel0t
9 Replies

6. UNIX for Dummies Questions & Answers

passwordless ssh

hi, i have tried with passwordless shh in google.. i followed the below steps ... user:~> ssh-keygen -t rsa Enter file in which to save the key (/home/cantin/.ssh/id_rsa):key.txt Enter passphrase (empty for no passphrase): Enter same passphrase again: till this step i... (0 Replies)
Discussion started by: arunmanas
0 Replies

7. Red Hat

ssh private key passwordless authentication

Hello, Need a suggestion to setup private key passwordless authentication. I am not sure this can done or not :wall: here is the sincerio I have two servers, sever1 with a user "user1" and servera with usera here dataflow: usera from servera, will pull/push files to server1 on user1... (2 Replies)
Discussion started by: bobby320
2 Replies

8. UNIX for Dummies Questions & Answers

[Solved] Passwordless authentication lost between cluster nodes

after copying the public key then also the passwordless authentication is not working Best regards, Vishal (2 Replies)
Discussion started by: Vishal_dba
2 Replies

9. Shell Programming and Scripting

Passwordless Authentication and Anonymous login

Hi, I am in the process FTPing some of my report files from my production server to another FTP server through batch/Shell Script. This is working fine with the password less authentication. Once i place all my report files in the ftp server the end users need to download ... (3 Replies)
Discussion started by: Showdown
3 Replies

10. Shell Programming and Scripting

Ssh passwordless authentication

Hey team I have to enable password less authentication betweeen A to B server and A to C server and A to D server. For this I generated a ssh key on server A using ssh-keygen command and copied the key using ssh-copy-id command to B, C and D server. Everything is working fine as of now but... (5 Replies)
Discussion started by: Sandeep_sandy
5 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for host-based authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host- based authentication is used. /etc/ssh/ssh_host_dsa_key-cert.pub /etc/ssh/ssh_host_ecdsa_key-cert.pub /etc/ssh/ssh_host_rsa_key-cert.pub If these files exist they are assumed to contain public certificate information corresponding with the private keys above. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
ssh-keysign first appeared in OpenBSD 3.2. AUTHORS
Markus Friedl <markus@openbsd.org> BSD
August 31, 2010 BSD
All times are GMT -4. The time now is 02:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy