![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| password | MastaFue | UNIX for Dummies Questions & Answers | 3 | 05-07-2008 01:21 AM |
| Password | zunacai | Shell Programming and Scripting | 1 | 08-24-2006 11:51 AM |
| sc password | ppass | SUN Solaris | 2 | 10-09-2005 09:59 PM |
| Change password by pushing encrypted password to systems | benq70 | UNIX for Dummies Questions & Answers | 1 | 09-02-2005 06:08 AM |
| password | pydyer | Security | 3 | 01-08-2002 08:39 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
ssh without password
Hi,
I have the necessity to run a korn shell on a remote server (both HP-UX servers) using the ssh command. The sintax that I use is ssh -l <remote user> <IP address of remote host> command(ksh script) Pressing enter I need to set the password of the remote user. Is it possible to evoid to insert the password? In this way I can insert in may local ksh script the above command. Many thanks in advance for your kind cooperation. Giovanni |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
create ssh keys on your local server and propagate the authorized_keys2 file to your $HOME/.ssh directories on the remote servers ... see "man ssk-keygen" and "man ssh" ...
good luck! |
|
#3
|
|||
|
|||
|
For SSH Without a Password
Client
Steps: For SSH Without a Password On the client run the following commands: $ mkdir -p $HOME/.ssh $ chmod 0700 $HOME/.ssh $ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P '' This should result in two files, $HOME/.ssh/id_dsa (private key) & $HOME/.ssh/id_dsa.pub (public key). Copy $HOME/.ssh/id_dsa.pub to the server. Server: On the server run the following commands: $ mkdir -p $HOME/.ssh $ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2 $ chmod 0600 $HOME/.ssh/authorized_keys2 Depending on the version of OpenSSH the following commands may also be required: $ cat id_dsa.pub >> $HOME/.ssh/authorized_keys $ chmod 0600 $HOME/.ssh/authorized_keys An alternative is to create a link from authorized_keys2 to authorized_keys: $ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys On the client test the results by ssh'ing to the server: $ ssh -i $HOME/.ssh/id_dsa server (Optional) Add the following $HOME/.ssh/config on the client: Host server IdentityFile ~/.ssh/id_dsa This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time. |
|||
| Google The UNIX and Linux Forums |