ssh-keygen error


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ssh-keygen error
# 1  
Old 11-01-2011
ssh-keygen error

Hi,

I using ssh-keygen for passwordless authenciation firstly
and I am following these steps mentioned below...

1) Login to pngpcdb1 using your user/pass
2) type 'bash' (without quotes)
3) ssh-keygen #generates private and public key.
4) copy this private key to the location of your sftp script
5) mkdir ~/.ssh
6) create a file named authorized_keys in ~/.ssh
7) chmod 600 ~/.ssh/authorized_keys
8) cat sftp_rsa.pub > ~/.ssh/authorized_keys
9) copy public key to ~/.ssh folder


firstly I login to remote machine thru putty with me credentials and then i enter in the remote server ...the issues is when I again reenter this machine with my credentials then I eneter ssh pngpcdb1 , it asks for password but it should not ask for password since now authenticationSmilie is key based..!!
# 2  
Old 11-01-2011
Lets say you want to ssh from server1 to server2 as user "admin"

Actions on server1
1. Log into server1
2. Execute "ssh-keygen" to generate the keys
3. By default keys will be generated at ~/.ssh ($HOME/.ssh)
4. ftp the ~/.ssh/id_rsa.pub to server2 as /tmp/id_rsa.pub_server1

Actions on server2
1. Log in to server 2 as "admin"
2. Create the directory ~admin/.ssh if not present
3. Copy the contents of /tmp/id_rsa.pub_server1 to ~admin/.ssh/authorized_keys. Create the file authorized_keys if not present and chmod to 600.

Following should work without password.
Code:
server1> ssh admin@server2

HTH
--ahamed
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ssh-keygen problems

For some reason, when I try copying my public key to the server, despite it showing as being successful: rob@linux044:~$ ssh-copy-id -i /home/rob/Work/Keys/keys.txt.pub !@#$%.com /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/home/rob/Work/Keys/keys.txt.pub"... (7 Replies)
Discussion started by: Circuits
7 Replies

2. Cybersecurity

What makes up ssh-keygen keys?

When using ssh-keygen what does it look at to build the ssh keys? (1 Reply)
Discussion started by: toor13
1 Replies

3. Shell Programming and Scripting

ssh keygen in unix server

I have a central unix server and more than 200 unix server to connect from central server .For this to take place i want to use ssh keygen between & among servers .Do anybody has an idea how to automate this process . The server has same user id and same password (0 Replies)
Discussion started by: gauravsinha
0 Replies

4. Shell Programming and Scripting

sftp ssh-keygen

sftp username@host <<EOF lcd /home/dirA cd /home/dirB mput *.txt exit EOF Hi, i have done the keygen-ssh settings but rite now I log through putty I enter my credentials and then when i successfully log in, then I issue the command ssh server name then I again enter into the server but... (1 Reply)
Discussion started by: rahulsxn660
1 Replies

5. UNIX for Dummies Questions & Answers

keygen-ssh

Hi, I was going thruough the password less authentication of keygen-ssh that will help us in generating keys...One thing that is not clear to me that if in nearby future we conncet to remote ftp server in that case now we need to only provide the user id itself that is password would not be... (1 Reply)
Discussion started by: rahul125
1 Replies

6. UNIX for Dummies Questions & Answers

ssh-keygen

Hi, I am new to unix, recently i was exploring password less remote connection to the ftp server and in that I was exploring the ssh-keygen utility, that it generates private & public keys that helps in transmitting files in encrypted format.Could you please explain me in detail about the... (1 Reply)
Discussion started by: rahul125
1 Replies

7. Solaris

Error generating ssh-keygen

I'm trying to generate this key but getting an error "file not found" Here is the command: # ssh-keygen -t dsa Generating public/private dsa key pair. Enter file in which to save the key (//.ssh/id_dsa): /export/home/bartadm/.ssh/id_dsa Enter passphrase (empty for no passphrase): Enter... (2 Replies)
Discussion started by: Kjons76
2 Replies

8. Shell Programming and Scripting

Query regarding ssh keygen

Hi, I have two Unix servers A and B. I have a script in server A. I want to connect to server B from A using ssh only and without giving passwords everytime i connect. I went through other posts regarding this and I generated a public key in server A and copied that in server B. Now when I... (3 Replies)
Discussion started by: mick_000
3 Replies

9. Shell Programming and Scripting

SSH-Keygen script

Hello friends, I wanna to make new script which work as i defined below (1) it connect (using ssh) to remote server (2) remote server having passphrase key with password (3) Generate new passphrase on local machine with random 8 character password. (4) It will atomatically uploaded to... (4 Replies)
Discussion started by: jagnikam
4 Replies

10. UNIX for Advanced & Expert Users

ssh-keygen questions (not working)

I have created the keys and placed the public key in the remote user directory (not the server root). (remote machine: dwebapp1) ex: /home/webarch/user_name/.ssh/authorized_keys2 cannot ssh into the remote machine using the following command: ssh ${dwebapp1} the manned description gives... (10 Replies)
Discussion started by: tekline
10 Replies
Login or Register to Ask a Question