Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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 try to access from PC A to PC B and I have got this problem:
Code:
user@user-D:~$ ssh -p 1001 user@10.10.10.101
ssh: connect to host 10.10.10.101 port 1001: Connection refused
What I did is:
1. Installed ssh in both computers. (ssh, openssh-client, openssh-server)
2. In computer B: Open port 1001 in redirect it to computer B in router (NAT settings)
3. Try accesgin computer B this way:
4. Do a ping from PC A to PC B ping 10.10.10.101 and PING is OK
Code:
ssh -p 1001 user@10.10.10.101
where 10.10.10.101 is an example of the public IP of computer B
On PC B the computer you want to access you forgot to configure SSH to use port 1001. Standard port is 22 you have to change it in /etc/ssh/sshd_config.
Good tools to use if you want to find errors in your setup is: nmap, netstat, and syslog.
1) Check your firewall with "iptables -L" and flush it if needed ("iptables -F")
2) Check if the ssh deamon is actually listening on the port you configured: "netstat -nap | grep sshd"
3) Does the user exist on PC B?
The NAT - Virtual Server settings are the ones you have to set up correctly. In your first post you use port 1001, but according to the output of netstat your sshd is listening on port 2953, have you set up that correctly in your router?
I was configured port triggering.
Now I configured virtual services and now it works.
I tried with virtual services correctly configured before, but I didnot restart ssh deamon.
Now it works Ok.I tried it with android and it works. Thank you very much.
About sshd is listening on port 2953, I have not idea. I didnot toush that. But I will not edit that, because now it works.
BTW, when I try editing /etc/ssh/sshd_config with gedit, it desnot want to. With nano no problem. Do you know why?
Usually this is a permission problem, try to start gedit with gksu (dependend on which distribution and DE you use this may also be gksudo, kdesu, kdesudo, sux, ...).
root@cserver:/home/user# gedit /etc/ssh/sshd_config
(gedit:5912): EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported
** (gedit:5912): WARNING **: Could not connect to session bus
How to do it with gksu? I use gnome. And gedit is installed and works with other files.
I did it as root.
I tried it in non root terminal and it works. Promt me a input to set the password and that's ok.
But when I try in root terminal it doesnot work. I dont understand the problem.
If root has permision to all files and directories? What really happend? Why Linux doesnot let me edit it?
It would let you edit it, but it has problems to connect to the running X session (that is running as your user). This is the problem with most X applications you try to run as root, that is why things like gksu exist.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.