- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Help me with passwordless login.
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
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
тАО04-29-2008 03:43 AM
тАО04-29-2008 03:43 AM
Help me with passwordless login.
ssh on source is
ssh: SSH Secure Shell 3.1.0 on i686-pc-linux-gnu
On desitnation. hp ssh. So keys base authentication is now working. I need a way to login without pass. I tried expect, but I am not able to do it. I just need expect to send a pass..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 04:24 AM
тАО04-29-2008 04:24 AM
Re: Help me with passwordless login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 04:38 AM
тАО04-29-2008 04:38 AM
Re: Help me with passwordless login.
null-passphrased keys should only be used for batch scripts run via cron. Do not use them for normal interactive shells.
ssh-agent is what you want to use for your interactive keys. The short version is:
1. `ssh-agent ` to start the agent
2. ssh-add to add your keys into it.
3. ssh-add -l to verify your kesy are in it.
You will need to do this for each window you're using. There are methods of sharing ssh-agents across which take longer to go into and, unfortunately, I'm somewhat time restrained atm...
Doug O'Leary
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 04:46 AM
тАО04-29-2008 04:46 AM
Re: Help me with passwordless login.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 05:45 AM
тАО04-29-2008 05:45 AM
Re: Help me with passwordless login.
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 07:03 AM
тАО04-29-2008 07:03 AM
Re: Help me with passwordless login.
In the OpenSSH, you can generate a SSH key by simply running "ssh-keygen -t rsa" or "ssh-keygen -t dsa" (choosing your preferred algorithm), use the default key name and have the key used automatically.
But the commercial SSH requires you to manually create a file named ~/.ssh2/identification, containing a line with the word IdKey and the filename of your private key.
Example .ssh2/identification file content:
------------------------
IdKey id_2048_rsa_a
------------------------
If the file ~/.ssh2/identification does not exist, the commercial SSH client will not even try to authenticate using SSH keys.
If you set an empty passphrase to your SSH key, the key-based authentication will allow you to log in automatically with no password/passphrase prompts at all.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-29-2008 12:05 PM
тАО04-29-2008 12:05 PM
Re: Help me with passwordless login.
1. generate a public and private key on your local system (such as a PC).
2. Add the public key from your local system to the .ssh/authorized_keys file on the remote system
Now use: ssh remoteSYS date
and you'll see the date on the remote system. Now for all the gotchas(tm):
- The local public key will be much, much longer than your terminal screen. This means special handling when copying and pasting. There must never be any spaces inside the key. The key will be exactly 1-line with 3 words. Verify this with wc:
wc -lw .ssh/id_rsa.pub
1 3 .ssh/id_dsa.pub
1 line, 3 words. The first word is the key type: ssh-rsa, the second word is a very long string of random characters and the last is typically the user@the_local_host, like this:
ssh-rsa AAAAB3Nza...stuff...G+ClGBQ= billh@mycpu23
This one long line must be copied and pasted exactly as one line.
- on the remote system, you need $HOME to contain a .ssh directory and if not already there, create a file called authorized_keys. Then before you forget, set the following permissions at the remote system:
chmod 750 $HOME
chmod 700 $HOME/.ssh
chmod 600 $HOMD/.ssh/authorized_keys
where $HOME is the remote system's HOME directory for the user you are setting up for passwordless login. Now append the long string to authorized_keys. Sounds easy but options in your terminal emulator and vi will fight you on this. So rather than use vi, just echo the contents from your local file onto the end of the authorized_keys file:
cat >> $HOME/.ssh/authorized_keys
At the above command, just use the Paste ability of your terminal to supply the cat command with text. Now check the file:
wc -lw $HOME/.ssh/authorized_keys
A single public key will show 1 line and 3 words. If not, edit the authorized_keys file and fix any broken lines.
- Some terminal emulators do not insert the keytype (as in: ssh-rsa) so you can add that to the key. You can also insert some comment lines like:
---- BEGIN SSH2 PUBLIC KEY ----
or
--- START SSH2 KEY for BILLH at CPU23 ---
These comments are ignored.
At this point, all should be working. To test this, on the local machine:
ssh cpu67 date
Tue Apr 29 16:02:57 EDT 2008
which means you connected, authenticated successfully and ran the date command. To simply login to an interactive session, just use ssh
Bill Hassell, sysadmin