Solved

cannot rsh linux using public key

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SSh using preshared keys - Connection reset 5 136
jump server vs push server 6 154
bad ownership or modes for chroot directory 6 69
Authentication Problems via Telnet 8 61
Secure Shell (SSH) is a network protocol for secure data communication, mainly used to administer remote Unix / Linux servers via command line. But it also allows the user to open a secure tunnel between a client and a server where he can send any k…
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 …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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…

862 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

25 Experts available now in Live!

Get 1:1 Help Now