LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 11-20-2011, 09:26 PM   #1
jack_green
Member
 
Registered: Jul 2011
Posts: 73

Rep: Reputation: Disabled
help ! stuck by ssh service


ok, guys. I cannot control sshd service on my rhel 5.6
i have two pc , one is client and the other is server.
i wanna write a bash script for increment backup some files on my client and then send the log file to server.
Let me show you guys what i have done :

Client
1: ssh-keygen
2:ssh-copy-id -i ~/.ssh/id_rsa.pub server

and then
scp -B /home/jack/* $SERVER:/tmp/
Address 192.168.4.171 maps to server171.com, but this does not map back to the address - POSSIBLE BREAK-IN ATTEMPT!
Permission denied (publickey,gssapi-with-mic,password).
lost connection

please help me . Thanks so much

Last edited by jack_green; 11-20-2011 at 09:55 PM.
 
Old 11-21-2011, 05:55 AM   #2
parunachalam
LQ Newbie
 
Registered: Jan 2010
Posts: 3

Rep: Reputation: 0
Follow the below mentioned steps to enable the ssh/sftp connectivity

1)
Command : ssh-keygen -b 1024 -t <rsa (or) dsa> : This is create a key pair public/private keys.

User Home Dir Perm : 755
.ssh Dir Perm : 700
Public Key File Perm : 644 (or) 640
Private Key File Perm : 600

2) Users Public key needs to be appended in the authorized_keys2 file , This file has to be created if not available inside the .ssh dir.

authorized_keys2 File perm : 644

Similarly remote system Home Dir / .ssh dir and public/private and authorized_keys2 file should also have this permission. Kindly let me know if you need any more details.
 
Old 11-21-2011, 07:01 PM   #3
jack_green
Member
 
Registered: Jul 2011
Posts: 73

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by parunachalam View Post
Follow the below mentioned steps to enable the ssh/sftp connectivity

1)
Command : ssh-keygen -b 1024 -t <rsa (or) dsa> : This is create a key pair public/private keys.

User Home Dir Perm : 755
.ssh Dir Perm : 700
Public Key File Perm : 644 (or) 640
Private Key File Perm : 600

2) Users Public key needs to be appended in the authorized_keys2 file , This file has to be created if not available inside the .ssh dir.

authorized_keys2 File perm : 644

Similarly remote system Home Dir / .ssh dir and public/private and authorized_keys2 file should also have this permission. Kindly let me know if you need any more details.

thanks your reply. but the first command didnot work in my rhel: ssh-keygen -b 1024 -t rsa
 
  


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
[SOLVED] ssh: Name or service not known windstory Linux - Newbie 2 11-22-2009 09:18 PM
Fedora system stuck at system message bus service upon bootup guy_ripper Linux - Software 4 02-16-2009 01:54 PM
start service stuck up jvan Linux - Newbie 1 01-07-2008 01:11 AM
ssh name or service not known? gonzojd7 Linux - Networking 11 09-08-2006 11:17 PM
Can't SSH until restart service Da Puff Mandriva 4 09-14-2005 08:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 08:45 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