Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got two servers using OS “Red Hat Enterprise Linux AS release 4 Update 4"
I setup follow for ssh:
- Source machine: 192.168.1.99
oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
Created directory '/home/oraprod/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
9a:f6:48:55:f9:0d:b4:93:fe:c1:10:da:ca:0b:41:77 oraprod@test.hapaco.vn
[oraprod@test ~]$ cd .ssh
[oraprod@test .ssh]$ cp id_rsa.pub authorized_keys
- Copy authorized_keys (if .ssh folder doesn’t exist on destination machine, copy all folder) from source machine to destination machine (192.168.1.100 )
- set permission 777 for .shh folder and authorized_keys file on destination machine
- From 192.168.1.99 login to 192.168.1.100
[oraprod@test ~]$ slogin 192.168.5.100
Connection closed by 192.168.5.100
But i always received: “Connection closed by 192.168.5.100”
I changed 192.168.5.100 by another server 192.168.5.98 and setup it the same 192.168.5.100. But I login from 192.168.5.99 to 192.168.5.98 successfully
Could you help me. What’s wrong with 192.168.5.100 ?
Thanks you
%h define u can login diff users with pub key r else u can use only for root
just
generate a key using putty generator copy the public key to /.ssh/authorized_keys terminal in ur server
chmod -R 777 /.ssh/authorized_keys
u have to paste the keys properly in authorised_keys terminal r else u will server refused our key error
copy the private key to ur putty and just login u can login
like these u could get while generating pub key in putty generator
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8= ssh-rsa 15245
vi .ssh/authorizedkeys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8=
remove ssh-rsa 15245 while pasting in ur authorized key terminal
try it if u face error come once again
Last edited by jsaravana87; 09-20-2011 at 05:11 AM.
- set permission 777 for .shh folder and authorized_keys file on destination machine
/home/oraprod/.ssh should owned by oraprod and group oraprod and have at most octal 0750 and not 0777, /home/oraprod/.ssh/authorized_keys is suggested to have at most 0600.
Quote:
Originally Posted by cuongvuxuan
What’s wrong with 192.168.5.100 ?
Can't tell. On the client issue slogin as 'slogin -vv' and save output. On the server look at where sshd logs to and see if there's any ssh lines post output of both.
%h define u can login diff users with pub key r else u can use only for root
just
generate a key using putty generator copy the public key to /.ssh/authorized_keys terminal in ur server
chmod -R 777 /.ssh/authorized_keys
u have to paste the keys properly in authorised_keys terminal r else u will server refused our key error
copy the private key to ur putty and just login u can login
like these u could get while generating pub key in putty generator
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8= ssh-rsa 15245
vi .ssh/authorizedkeys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8=
remove ssh-rsa 15245 while pasting in ur authorized key terminal
try it if u face error come once again
Dear arun5002
I did following your instructions
FIRST TIME:
- I edited /etc/ssh/sshd_config and here’s Its contents now
# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes
"/etc/ssh/sshd_config" 111L, 3026C 43,1
35%
- And then
[oraprod@test ~]$ su - root
Password:
[root@test ~]# vi /etc/ssh/sshd_config
[root@test ~]# su - oraprod
[oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
/home/oraprod/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
d0:86:28:3a:57:91:4f:ed:3f:43:13:61:61:15:20:91 oraprod@test.hapaco.vn
[oraprod@test ~]$ cd .ssh
[oraprod@test .ssh]$ cp id_rsa.pub authorized_keys
- Copy authorized_keys from 192.168.5.99 to 192.168.5.100. Here is content of authorized_keys file
[oraprod@test .ssh]$ slogin -vv 192.168.5.100
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.5.100 [192.168.5.100] port 22.
debug1: Connection established.
debug1: identity file /home/oraprod/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/oraprod/.ssh/id_rsa type 1
debug1: identity file /home/oraprod/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 132/256
debug2: bits set: 512/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.5.100' is known and matches the RSA host key.
debug1: Found key in /home/oraprod/.ssh/known_hosts:2
debug2: bits set: 492/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/oraprod/.ssh/identity ((nil))
debug2: key: /home/oraprod/.ssh/id_rsa (0x9716668)
debug2: key: /home/oraprod/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Trying private key: /home/oraprod/.ssh/identity
debug1: Offering public key: /home/oraprod/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
Connection closed by 192.168.5.100
SECOND TIME
- I removed oraprod@test.hapaco.vn from authorized_keys and then copied it to 192.168.5.100
Here’s content of authorized_keys file
[oraprod@test ~]$ slogin -vv 192.168.5.100
OpenSSH_3.9p1, OpenSSL 0.9.7a Feb 19 2003
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.5.100 [192.168.5.100] port 22.
debug1: Connection established.
debug1: identity file /home/oraprod/.ssh/identity type -1
debug2: key_type_from_name: unknown key type '-----BEGIN'
debug2: key_type_from_name: unknown key type '-----END'
debug1: identity file /home/oraprod/.ssh/id_rsa type 1
debug1: identity file /home/oraprod/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_3.9p1
debug1: match: OpenSSH_3.9p1 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9p1
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes256-cbc,rijndael-cbc@lysator.liu.se,aes128-ctr,aes192-ctr,aes256-ctr
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit: none,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_init: found hmac-md5
debug1: kex: server->client aes128-cbc hmac-md5 none
debug2: mac_init: found hmac-md5
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 140/256
debug2: bits set: 513/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '192.168.5.100' is known and matches the RSA host key.
debug1: Found key in /home/oraprod/.ssh/known_hosts:2
debug2: bits set: 505/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /home/oraprod/.ssh/identity ((nil))
debug2: key: /home/oraprod/.ssh/id_rsa (0x99a9668)
debug2: key: /home/oraprod/.ssh/id_dsa ((nil))
debug1: Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Next authentication method: gssapi-with-mic
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug1: An invalid name was supplied
Cannot determine realm for numeric host address
debug2: we did not send a packet, disable method
debug1: Next authentication method: publickey
debug1: Trying private key: /home/oraprod/.ssh/identity
debug1: Offering public key: /home/oraprod/.ssh/id_rsa
debug2: we sent a publickey packet, wait for reply
Connection closed by 192.168.5.100
At the and I haven't solve this problem.
Thanks you
[oraprod@test ~]$ su - root
Password:
[root@test ~]# vi /etc/ssh/sshd_config
[root@test ~]# su - oraprod
[oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
/home/oraprod/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
d0:86:28:3a:57:91:4f:ed:3f:43:13:61:61:15:20:91 oraprod@test.hapaco.vn
[oraprod@test ~]$ cd .ssh
[oraprod@test .ssh]$ cp id_rsa.pub authorized_keys
- Copy authorized_keys from 192.168.5.99 to 192.168.5.100. Here is content of authorized_keys file
[oraprod@test ~]$ ssh-keygen -t rsa these command
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa)
just generate a pub key in putty password generator click public key it will generate a pub key just copy it and paste it to ur authorized_keys
chmod -R 777 /.ssh/authorized_keys
put ur private key generate by putty to ur putty terminal and logon u can login .if ur using putty password generator for generating pub &private key so that there is not no need to generate password via ssh-keygen -t rsa commmand in ur terminal
like these u could get while generating pub key in putty generator
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8= ssh-rsa 15245
remove these line ssh-rsa 15245 while pasting to ur authorizedkeys terminal
vi .ssh/authorizedkeys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8=
try it
Last edited by jsaravana87; 09-21-2011 at 12:33 AM.
[oraprod@test ~]$ su - root
Password:
[root@test ~]# vi /etc/ssh/sshd_config
[root@test ~]# su - oraprod
[oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
/home/oraprod/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
d0:86:28:3a:57:91:4f:ed:3f:43:13:61:61:15:20:91 oraprod@test.hapaco.vn
[oraprod@test ~]$ cd .ssh
[oraprod@test .ssh]$ cp id_rsa.pub authorized_keys
- Copy authorized_keys from 192.168.5.99 to 192.168.5.100. Here is content of authorized_keys file
[oraprod@test ~]$ ssh-keygen -t rsa these command
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa)
just generate a pub key in putty password generator click public key it will generate a pub key just copy it and paste it to ur authorized_keys
chmod -R 777 /.ssh/authorized_keys
put ur private key generate by putty to ur putty terminal and logon u can login .if ur using putty password generator for generating pub &private key so that there is not no need to generate password via ssh-keygen -t rsa commmand in ur terminal
like these u could get while generating pub key in putty generator
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8= ssh-rsa 15245
remove these line ssh-rsa 15245 while pasting to ur authorizedkeys terminal
vi .ssh/authorizedkeys
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAg2CZvrXsoEEaFKcrQrCllxtnxAMqcJWMMgya0udXGpHJwqjDXMq1J+5LXB2zw/ZbplHx5gwyPDzszwTsAWGF7j4oykkmX/I1ayyjoJ+prwp4XzbpJ152DJ2QZhyEiMFUxFxjKNyTgdhDd3igkM1/NpZwhFmvcQXL95pWX8fjUj8=
try it
Dear arun5002
I ‘ve tried again follow your instructions. The content of authorized_keys is:
Going back to the beginning and no exisiting .ssh directory anywhere. On the source machine 192.168.1.99 :
Code:
$ ssh-keygen -t rsa
$ ssh-copy-id 192.168.1.100
You have to supply one time the password and all is set up for you with the correct permissions.
I removed .ssh folder and begin at first
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Kernel 2.6.9-42.ELsmp on an i686
login: oraprod
Password:
Last login: Thu Sep 22 09:50:26 from 192.168.1.81
You have new mail.
[oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
Created directory '/home/oraprod/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
f0:12:c1:e9:b8:a5:9f:fd:7f:e3:40:54:c2:21:b0:24 oraprod@test.hapaco.vn
[oraprod@test ~]$ ssh-copy-id 192.168.5.100
-bash: ssh-copy-id: command not found
[oraprod@test ~]$
I also used to try:
ssh-copy-id oraprod@192.168.5.100
-bash: ssh-copy-id: command not found
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
Kernel 2.6.9-42.ELsmp on an i686
login: oraprod
Password:
Last login: Thu Sep 22 09:50:26 from 192.168.1.81
You have new mail.
[oraprod@test ~]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/oraprod/.ssh/id_rsa):
Created directory '/home/oraprod/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/oraprod/.ssh/id_rsa.
Your public key has been saved in /home/oraprod/.ssh/id_rsa.pub.
The key fingerprint is:
f0:12:c1:e9:b8:a5:9f:fd:7f:e3:40:54:c2:21:b0:24 oraprod@test.hapaco.vn
[oraprod@test ~]$ ssh-copy-id 192.168.5.100
-bash: ssh-copy-id: command not found
[oraprod@test ~]$
I also used to try:
ssh-copy-id oraprod@192.168.5.100
-bash: ssh-copy-id: command not found
The ssh-copy-id might not exist in your rhel installation but doesn't matter, its function is already explained in the manpage that you pointed.
But have you tried other method like using cp, rcp to copy the public key strings generated to the remote machine /.ssh/authorized_keys files and try to ssh with verbose mode again?
The ssh-copy-id might not exist in your rhel installation but doesn't matter, its function is already explained in the manpage that you pointed.
But have you tried other method like using cp, rcp to copy the public key strings generated to the remote machine /.ssh/authorized_keys files and try to ssh with verbose mode again?
command "rcp" means "Copy from/to remote server with SSH" (http://varrunr.wordpress.com/2009/05...rver-with-ssh/), now i have got problem with SSH so it can't do.
I copied to the remote machine by FTP and done many times but not successfull.
I think, the problem isn't using of coping method
Last edited by cuongvuxuan; 09-21-2011 at 11:22 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.