cancel
Showing results for 
Search instead for 
Did you mean: 

ssh daemon restart

SOLVED
Go to solution
toni osta
Frequent Advisor

ssh daemon restart

Hi ,
I want to use scp without password ,
i have make the key generation method and now i want to restart the ssh daemon
how i can restart it
i have 11i v2 unix

Thank you
10 REPLIES
Johnson Punniyalingam
Honored Contributor
Solution

Re: ssh daemon restart

/sbin/init.d/secsh stop

/sbin/init.d/secsh start


Thanks,
Johnson
Problems are common to all, but attitude makes the difference
T G Manikandan
Honored Contributor

Re: ssh daemon restart

I dont think you need to restart the daemon, have the .pub key from the client to .ssh_authorized_keys on server and do a scp.
toni osta
Frequent Advisor

Re: ssh daemon restart

Hi ,
i have restarted the daemon and it is always asking for a password ,
Please somene have the exact method that i should use to not have the password prompt ,
and all the files that i should modify

the client that i am using from it the scp command , i am using it from a oracle user
or the server (destination) , i am doing scp on root

Thank you
T G Manikandan
Honored Contributor

Re: ssh daemon restart

If you are performing SSH from oracle user on source to root user on destination.

1.Generate SSh keys from oracle user source machine.
2.Copy the contents of .pub key from the generated keys into the destination machine .ssh/authorized_keys file for the root user.

then you can perform a

sourcemachine#scp /tmp/test.txt
root@destinationmachine

check

http://saikrishbe.wordpress.com/2007/01/19/remote-login-without-password/
Johnson Punniyalingam
Honored Contributor

Re: ssh daemon restart

Hi Toni,

First link from "Suraj >>K Sankari "<<<

very Good take look for the steps.

Thanks,
Johnson
Problems are common to all, but attitude makes the difference
toni osta
Frequent Advisor

Re: ssh daemon restart

Hi ,
I have followed step by step the method given but still prompt for a password ,

Hi,
Here is the steps to make auto ssh.

First login on Server-A as user "a" and generate a pair of authentication keys.

[a@A]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/a/.ssh/id_rsa):
Created directory '/home/a/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/a/.ssh/id_rsa.
Your public key has been saved in /home/a/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 a@A


Then login on server-B as user "b" and generate a pair of authentication keys. Do not enter a passphrase:
[b@b]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/b/.ssh/id_rsa):
Created directory '/home/b/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/b/.ssh/id_rsa.
Your public key has been saved in /home/b/.ssh/id_rsa.pub.
The key fingerprint is:
3e:4f:05:79:3a:9f:96:7c:3b:ad:e9:58:37:bc:37:e4 b@B

Finally append a@A's new public key to b@B:.ssh/authorized_keys and enter b's password one last time:

[a@A]# cat .ssh/id_rsa.pub | ssh b@B 'cat >> .ssh/authorized_keys'

b@B's password:

From now we can login to server-B as b from server-A as a without password:
[a@A]# ssh b@B hostname
B
Vinoyee Madashery Poulo
Frequent Advisor

Re: ssh daemon restart

Hi Toni,

If still not working check the permission for authorized_keys. It should be 644.
Vinoyee Madashery Poulo
Frequent Advisor

Re: ssh daemon restart


Hi Toni,

Let me simplify the steps.

1. On source system login as orcale user and execute ssh-keygen -t dsa
Hit 3 times enter key.
2. Copy id_dsa.pub to the destination systems /tmp directory and update this key to the /.ssh/authorized_keys as root user.
eg:
/tmp/id_dsa.pub >> /.ssh/authorized_keys

Make sure that /.ssh/authorized_keys has 644 permission.

Now login as orcale user on the system where you gerenrated key.
Then do scp root@
toni osta
Frequent Advisor

Re: ssh daemon restart

it works now , it is a permission error
thank you