Solved

cannot rsh linux using public key

Posted on 2012-04-04
2
536 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
deny acl with basic authentication user on squid 7 84
Delete a file from the remote SFTP server (C# Experts! SHARP.SSH) 14 1,038
People Counting Software 2 299
lunix and unix command 21 154
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 …
BIND is the most widely used Name Server. A Name Server is the one that translates a site name to it's IP address. There is a new bug in BIND (https://kb.isc.org/article/AA-01272), affecting all versions of BIND 9 from BIND 9.1.0 (inclusive) thro…
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…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

734 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