- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ssh without password
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 04:05 PM
тАО02-20-2006 04:05 PM
I want to run the ssh commands using script but it becomes interective as it needs password to be entered Pls help me how to enable the public private key . So that the ssh will not ask for password every time.
I have tried with public and private key but it does't worked or may be I was using it wrongly .
Pls give me the procedure also to do so.
Regards
Sachin Rajput
HCL
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 04:20 PM
тАО02-20-2006 04:20 PM
SolutionHi Sachin,
it can be done..
here is a procedure which got from Net.
Passwordless SSH using public/private keys
Including how to set up rsync and unison (syncronisation software)
Here is a list of the steps that I had to do to get automatic replication of /home/folder1 (or any other folder) on one server to /home/folder2 on another server:
Passwordless SSH
To get replication working securly you firstly need to be able to connect via SSH without using passwords:
First server setup
ssh-keygen -t dsa(press enter twice to give a blank password)
cd
cd .ssh
vi .configPress "i" to enter insert mode and copy this into the file:
Host remotehost
User remoteuser
Compression yes
Protocol 2
RSAAuthentication yes
StrictHostKeyChecking no
ForwardAgent yes
ForwardX11 yes
IdentityFile /home/localuser/.ssh/id_remotehost_dsaDo NOT change the last line - it is supposed to say remotehost (not an actual host name). the remoteuser specify as the other username Now,
:wq(save and exit vi)
vi id_dsa.pubIt should look like this:
ssh-dss AAAA..............v root@HOSTNAMEOFSRV01where there is lots of random letters/numbers where the dots are. Select it all and copy it. Make sure that it is all on one line with no spaces at the start or finish (which will happen if you copy it using putty on windows; test it by pasting it into notepad)
Tip: To copy from putty on windows select the text from within vi and pres Ctrl + Shift. To paste text enter insert mode and press the right mouse button. (best way would be to copy the file through scp)
Second Server Setup
cd
vi .ssh/authorized_keysEnter insert mode (press i) and paste the key, again ensuring that there are no spare newlines or spaces. Save the file and exit vi (press :wq then return, as above)
Testing passwordless SSH
On the first server, type
ssh -l other_user_name srv02
Hope this is useful,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 04:46 PM
тАО02-20-2006 04:46 PM
Re: ssh without password
Try this this works !!!
Generate a key pair using ssh-keygen, copy the public key to the remote host and place it in .ssh/authorized_keys (or authorized_keys2 for an SSH2 key). Then copy the private key to .ssh/identity on your local machine. Now everything├в s set for unhindered ssh├в ing.
Regards,
Abhijit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 04:57 PM
тАО02-20-2006 04:57 PM
Re: ssh without password
Check this document for setting up SSH without password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-20-2006 06:09 PM
тАО02-20-2006 06:09 PM
Re: ssh without password
I got the solution
Regards
Sachin Rajput
HCl