Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
hi,
i'm trying to send my public key(id_rsa.pub) to a remote server(172.18.3.255) without success. i used the below command
ssh-copy-id -i ~/.ssh/id_rsa.pub root@172.18.3.255
and the output was this:
ssh: connect to host 172.18.3.255 port 22: Connection timed out.
and the output was this:
ssh: connect to host 172.18.3.255 port 22: Connection timed out.
The computer is telling you that SSH is either not running, or it is not running on port 22. That or at the very least port 22 is blocked between you and the remote computer.
nmap is your friend for seeing if port 22 is open:
Code:
nmap -p22 <IP_of_Target_here>
That is the first thing you need to run. after that you will need to look into the ssh.conf of the remote system to see if its port has been changed, then if not you need to make sure it is running.
i run the command "nmap -PN22 172.18.19.183" and the output was
Nmap scan report for 172.18.19.183
Host is up.
All 1000 scanned ports on 172.18.19.183 are filtered
Nmap done: 1 IP address (1 host up) scanned in 201.35 seconds
What do you mean by remote server. The address 172.18.19.183 is a private address. Is the server on your LAN?
If the server isn't on your local LAN, you need to go through the destination's firewall via its Internet IP address, which needs to forward port 22 to the server.
If the server has an interface connected directly to the internet, then you need it's Internet IP address.
i run the command "nmap -PN22 172.18.19.183" and the output was
Nmap scan report for 172.18.19.183
Host is up.
All 1000 scanned ports on 172.18.19.183 are filtered
Nmap done: 1 IP address (1 host up) scanned in 201.35 seconds
but still i'm not able to ping the 172.18.19.183
Im not sure what the confusion is shemeza? The output of nmap flat out told you that port 22 is blocked. You either have to configure the firewall, or get whom ever is in charge of that system to grant you permission to ssh in. You will ALWAYS continue to have the same error msg. until you resolve this issue.
It can be caused by one of two things, mainly that is:
1. firewall issues (either hardware or software to include but not limited to iptables)
2. ssh is not running on that server therefore port 22 is not open.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.