Solved

cannot rsh linux using public key

Posted on 2012-04-04
2
538 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

632 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