LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-14-2014, 01:55 PM   #1
stevephd
LQ Newbie
 
Registered: Aug 2012
Posts: 9

Rep: Reputation: Disabled
openSSH


Hello
I am attempting to remote connect two linux systems together (one called frame, a RHL and the other steve, a fedora OS) using ssh.

Here is the procedure I followed:

#1 Generated dsa keys: $ ssh-keygen -t dsa on both computers frame and steve. I placed the id_dsa and id_dsa.public in a .ssh file on the home directory of the respective computers.

NOTE: I generated a "passphrase" for both computers using "keygen"

#2 I copied the public keys (id_dsa.pub) into the respective "authorized_keys" file that I also placed in the .ssh folder.


#3 I attempted to connect from steve to frame using $ "ssh frame@localhost.localdomain" and I got "Permission denied"..

The password that I used to connect to frame was the "passphrase" that I used to generate frame's keys..

Could someone tell me what I am doing wrong. This is my FIRST time attempting to do this and I have looked stuff up on line and in some books, but have not found anything that I can detect as directly related to my problem.

Any help would be greatly appreciated...


I did notice that I do have a ssh folder at /ect, and am not sure if I should place my keys here instead of at the /home/.ssh?????

Thanks
 
Old 04-14-2014, 04:51 PM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,704

Rep: Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897Reputation: 5897
The basic syntax is ssh username@hostname or ssh username@ip_address. However, if you do not have anything that resolves hostname to IP address then the first method will fail. localhost references the local loopback address (127.0.0.1) and is used for accessing network services on the computer itself.

So trying the command "ssh frame@localhost.localdomain"
from steve will fail if you do not have a user named frame on computer steve. In addition since you didn't have the right public keys on steve the password prompt was for the login password not the passphrase. I assume you have not disabled password authentication just yet.

/etc/ssh contains the server and default client configuration files.

If the firewall is running on both PCs make sure they allow ssh traffic.
Make sure the file permissions in your username (~/.ssh) are set for 600 and the ssh directory it self is 700.

Does any of this make sense?
 
1 members found this post helpful.
Old 04-15-2014, 01:45 AM   #3
jonmcc
LQ Newbie
 
Registered: Dec 2005
Distribution: Fedora Core 4
Posts: 7
Blog Entries: 1

Rep: Reputation: 2
Steve, you haven't mentioned which user you're connecting from & to. Make sure you specify that, unless its the same user on each side.

I'd also recommend using RSA keys, rather than DSA (faster). Here's an example of what of how to setup access from user1@steve -> user2@frame:
user1@steve$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): <enter password>
Enter same passphrase again: <repeat password>
user1@steve$ chmod 700 ~/.ssh
user1@steve$ chmod 600 ~/.ssh/id_rsa
user1@steve$ cat ~/.ssh/id_rsa.pub
<highlight key & copy to clipboard>


...in another window, logged into frame...
user2@frame$ mkdir ~/.ssh
user2@frame$ chmod ~/.ssh
user2@frame$ vi ~/.ssh/authorized_keys
<in edit mode, paste contents of clipboard (key from steve grabbed above). Write & Quit>
user2@frame$ chmod 700 ~/.ssh
user2@frame$ chmod 600 ~/.ssh/authorized_keys


...back on steve...
user1@steve$ ssh user2@frame
<you may be prompted to confirm the hostkey for frame2. Accept>
user2@frame$

...you should get a login prompt on frame.

To access from user2@frame to user1@steve, for the above in reverse. I set permissions above specifically. e.g. if perms are too weak on either side, SSH won't allow the connection.
 
1 members found this post helpful.
Old 04-15-2014, 02:59 AM   #4
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
I've recently put together a 5 steps version of this: http://centos.tips/ssh_nopw/
 
2 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert openssh keys to openssh tectia format LittleMaster Linux - Server 1 11-17-2012 07:39 AM
About openssh ust Linux - Newbie 1 08-05-2011 09:19 PM
LXer: Why a Distro-Provided OpenSSH is Better than a Third-Party OpenSSH LXer Syndicated Linux News 0 02-02-2011 07:50 AM
OpenSSH dream.impres Linux - Newbie 5 08-05-2008 01:31 AM
openSSH Niphargus Linux - Security 4 08-06-2002 08:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration