Asked by BharathKumarRaju DasaraRaju
at 2024-07-26 19:25:29
Point:500 Replies:6 POST_ID:829124USER_ID:11540
Topic:
SSH / Telnet Software;Linux;Linux Networking
error in ssh using without password.
local machine:
=================>
[root@bharathkumar .ssh]# ip a | grep -i inet | grep -i brd
inet 192.168.80.129/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar .ssh]# hostname
bharathkumar.test.com
[root@bharathkumar .ssh]# pwd
/root/.ssh
[root@bharathkumar .ssh]# ls -lrt
total 12
-rw-------. 1 root root 1675 Jul 26 18:40 id_rsa
-rw-r--r--. 1 root root 408 Jul 26 18:44 id_rsa.pub
-rw-r--r--. 1 root root 396 Jul 26 18:44 known_hosts
[root@bharathkumar .ssh]# cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA13kx9nOLlccO+XInzua6GqzD4oT9lEnY7AZ8+A5IDKGwzr9dG9I64IFKCZNESzKfqm8/JuciWd9LfpChuiKyQKyEux/Ub38FmPMQvxmtB+QyI69yVECOWYx7Q3B49uyfhXX0QRZneXXybS7KuUZvz1lrnaKD4Gn/NkXvGNcB7pBF3aDkYYZb6JJvno+KO4oI0u9Km1pui6nb4n9KxWWGeBjVPy68rPW8Zvz2qSWUwaZ6HsHbVVpLU5jdAQsa3G5doc1AATJsr7GrUghEX8VhSo0Qhpk9psTmPkpc9I43JfeWSdca32R1ocp7RufJQXWQHaYCcCyPv5Ha9gJ845N/Uw== root@bharathkumar.test.com
[root@bharathkumar .ssh]#
On Remote machine:
====================>
[root@bharathkumar .ssh]# hostname
bharathkumar.trimble2
[root@bharathkumar .ssh]# ip a | grep -i inet | grep -i brd
inet 192.168.80.130/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar .ssh]# ls -lart
total 28
-rw-------. 1 root root 50 Jul 24 08:38 nohup.out
-rw-r--r--. 1 root root 408 Jul 24 08:41 id_rsa.pub
-rw-------. 1 root root 1675 Jul 24 08:41 id_rsa
-rw-r--r--. 1 root root 396 Jul 26 18:42 known_hosts
-rw-r--r--. 1 root root 408 Jul 26 18:44 authorized_keys
dr-xr-x---. 3 root root 4096 Jul 26 18:44 ..
drwxr-xr-x. 2 root root 4096 Jul 26 18:44 .
[root@bharathkumar .ssh]# cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA13kx9nOLlccO+XInzua6GqzD4oT9lEnY7AZ8+A5IDKGwzr9dG9I64IFKCZNESzKfqm8/JuciWd9LfpChuiKyQKyEux/Ub38FmPMQvxmtB+QyI69yVECOWYx7Q3B49uyfhXX0QRZneXXybS7KuUZvz1lrnaKD4Gn/NkXvGNcB7pBF3aDkYYZb6JJvno+KO4oI0u9Km1pui6nb4n9KxWWGeBjVPy68rPW8Zvz2qSWUwaZ6HsHbVVpLU5jdAQsa3G5doc1AATJsr7GrUghEX8VhSo0Qhpk9psTmPkpc9I43JfeWSdca32R1ocp7RufJQXWQHaYCcCyPv5Ha9gJ845N/Uw== root@bharathkumar.test.com
[root@bharathkumar .ssh]#
I added the local machines id_rsa.pub key to the authorized_keys file in remote machine. but still i am unable to ssh without password from local machine...it is asking password agin?
[root@bharathkumar ~]# ip a | grep -i inet | grep -i brd
inet 192.168.80.129/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar ~]# ssh -l root 192.168.80.130
root@192.168.80.130's password:
local machine:
=================>
[root@bharathkumar .ssh]# ip a | grep -i inet | grep -i brd
inet 192.168.80.129/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar .ssh]# hostname
bharathkumar.test.com
[root@bharathkumar .ssh]# pwd
/root/.ssh
[root@bharathkumar .ssh]# ls -lrt
total 12
-rw-------. 1 root root 1675 Jul 26 18:40 id_rsa
-rw-r--r--. 1 root root 408 Jul 26 18:44 id_rsa.pub
-rw-r--r--. 1 root root 396 Jul 26 18:44 known_hosts
[root@bharathkumar .ssh]# cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA13kx9nOLlccO+XInzua6GqzD4oT9lEnY7AZ8+A5IDKGwzr9dG9I64IFKCZNESzKfqm8/JuciWd9LfpChuiKyQKyEux/Ub38FmPMQvxmtB+QyI69yVECOWYx7Q3B49uyfhXX0QRZneXXybS7KuUZvz1lrnaKD4Gn/NkXvGNcB7pBF3aDkYYZb6JJvno+KO4oI0u9Km1pui6nb4n9KxWWGeBjVPy68rPW8Zvz2qSWUwaZ6HsHbVVpLU5jdAQsa3G5doc1AATJsr7GrUghEX8VhSo0Qhpk9psTmPkpc9I43JfeWSdca32R1ocp7RufJQXWQHaYCcCyPv5Ha9gJ845N/Uw== root@bharathkumar.test.com
[root@bharathkumar .ssh]#
On Remote machine:
====================>
[root@bharathkumar .ssh]# hostname
bharathkumar.trimble2
[root@bharathkumar .ssh]# ip a | grep -i inet | grep -i brd
inet 192.168.80.130/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar .ssh]# ls -lart
total 28
-rw-------. 1 root root 50 Jul 24 08:38 nohup.out
-rw-r--r--. 1 root root 408 Jul 24 08:41 id_rsa.pub
-rw-------. 1 root root 1675 Jul 24 08:41 id_rsa
-rw-r--r--. 1 root root 396 Jul 26 18:42 known_hosts
-rw-r--r--. 1 root root 408 Jul 26 18:44 authorized_keys
dr-xr-x---. 3 root root 4096 Jul 26 18:44 ..
drwxr-xr-x. 2 root root 4096 Jul 26 18:44 .
[root@bharathkumar .ssh]# cat authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA13kx9nOLlccO+XInzua6GqzD4oT9lEnY7AZ8+A5IDKGwzr9dG9I64IFKCZNESzKfqm8/JuciWd9LfpChuiKyQKyEux/Ub38FmPMQvxmtB+QyI69yVECOWYx7Q3B49uyfhXX0QRZneXXybS7KuUZvz1lrnaKD4Gn/NkXvGNcB7pBF3aDkYYZb6JJvno+KO4oI0u9Km1pui6nb4n9KxWWGeBjVPy68rPW8Zvz2qSWUwaZ6HsHbVVpLU5jdAQsa3G5doc1AATJsr7GrUghEX8VhSo0Qhpk9psTmPkpc9I43JfeWSdca32R1ocp7RufJQXWQHaYCcCyPv5Ha9gJ845N/Uw== root@bharathkumar.test.com
[root@bharathkumar .ssh]#
I added the local machines id_rsa.pub key to the authorized_keys file in remote machine. but still i am unable to ssh without password from local machine...it is asking password agin?
[root@bharathkumar ~]# ip a | grep -i inet | grep -i brd
inet 192.168.80.129/24 brd 192.168.80.255 scope global eth0
[root@bharathkumar ~]# ssh -l root 192.168.80.130
root@192.168.80.130's password: