Solved

cannot rsh linux using public key

Posted on 2012-04-04
2
527 Views
Last Modified: 2012-04-04
I have 2 linux computers. I am trying to rsh from one to the other w/o passwords. I've done this successfully before, but I can't figure out what's wrong this time. On computer A, logged in as user ohprs', I ran ssh-keygen which created ~/.ssh/id_rsa.pub. Permisions:

ls -l .ssh/id_rsa.pub
-rw-r--r-- 1 ohprs ohprs 394 Apr  4 20:37 .ssh/id_rsa.pub

I copied the contents of that id_rsa.pub file. Then, on computer B, I logged in as user 'ohprs' and pasted the aforementioned copy to the file ~/.ssh/authorized_keys. Permissions:

ls -l .ssh/authorized_keys
-rw-r--r-- 1 ohprs ohprs 394 2012-04-04 20:39 .ssh/authorized_keys

I thought this would be sufficient to ssh w/o supplying a password, but it still prompts me for a password when trying to ssh from machine A to machine B.
0
Comment
Question by:jmarkfoley
2 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 37809328
I'm assuming you mean ssh instead of rsh?  Did you enter a passphrase during key pair generation?  Instead of copy/pasting your public key, scp it between machines then cat the file into ~/.ssh/authorized_keys

Remove any existing authorized_keys entries that you added for that user prior to redoing this process.
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 37809409
sorry, yes I did mean ssh.

I fixed it. Apparently, in all the times machine A was prompting me for a password I never actually tried to enter one. When I tried following your instructions to scp none of my password attempts worked. It turns out that I never set a password on that account. When I did so, my ssh worked just fine!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Fortigate scripting 1 508
Fail2Ban restart 5 61
ssh from Cisco asa5510 8 70
Comments on the use of ftp server/client on OS/400 AS/400 4 85
Hello EE, Today we will learn how to send all your network traffic through Tor which is useful to get around censorship and being tracked all together to a certain degree. This article assumes you will be using Linux, have a minimal knowledge of …
When it comes to security, there are always trade-offs between security and convenience/ease of administration. This article examines some of the main pros and cons of using key authentication vs password authentication for hosting an SFTP server.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now