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.
Is firewall running on 192.168.1.139. Usually if firewall is on it gives connection refused. The error message that you mentioned show that client machine is unable to connect to 192.168.1.139 on port 22.
Which means either ssh service is not running on 192.168.1.139 or your client machine is unable to communicate to 192.168.1.139.
Let us know the linux distribution that you are running on.
sh: connect to host 192.168.1.139 port 22: Connection refused
The above tells us that the request is getting to the server but it is getting refused. Are you sure firewall is disabled. Did you check the selinux status?
We will not be able to help you if you will not provide us the full information. I asked you which linux distribution you are using but you didnt mention.
I would suggest you to check selinux status on this server. You can check the selinux status using the following command:
Code:
sestatus
If it is running in enforcing mode then you can then disable it and then give it a try. To disable selinux edit its config file. Following is the command:
Code:
vi /etc/selinux/config
Change the value of SELINUX=enforcing TO SELINUX=disable, restart you machine and then give it a try to ssh.
I noticed you mentioned running an SCP command are you able to just SSH directly into a shell, or are you using scponly or some other type of restrictive shell? Is SCP enabled in your ssh config?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.