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'am newbie here,can somebody help me to fix accessing port 22 using ssh anywhere. Please see the sshd_config below:
# Package generated configuration file
# See the sshd(8) manpage for details
# What ports, IPs and protocols we listen for
Port 22
# Use these options to restrict which interfaces/protocols sshd will bind to
#ListenAddress ::
#ListenAddress 0.0.0.0
Protocol 2
# HostKeys for protocol version 2
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_dsa_key
#Privilege Separation is turned on for security
UsePrivilegeSeparation yes
# Lifetime and size of ephemeral version 1 server key
KeyRegenerationInterval 3600
ServerKeyBits 768
# Don't read the user's ~/.rhosts and ~/.shosts files
IgnoreRhosts yes
# For this to work you will also need host keys in /etc/ssh_known_hosts
RhostsRSAAuthentication no
# similar for protocol version 2
HostbasedAuthentication no
# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
#IgnoreUserKnownHosts yes
# To enable empty passwords, change to yes (NOT RECOMMENDED)
PermitEmptyPasswords no
# Change to yes to enable challenge-response passwords (beware issues with
# some PAM modules and threads)
ChallengeResponseAuthentication no
# Change to no to disable tunnelled clear text passwords
PasswordAuthentication yes
# Kerberos options
#KerberosAuthentication no
#KerberosGetAFSToken no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
# GSSAPI options
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
X11Forwarding yes
X11DisplayOffset 10
PrintMotd no
PrintLastLog yes
TCPKeepAlive yes
#UseLogin no
#MaxStartups 10:30:60
#Banner /etc/issue.net
# Allow client to pass locale environment variables
AcceptEnv LANG LC_*
Are you talking of a connection within a LAN or are you trying to access a machine that sits behind a router from the www. In the latter case you may have to configure the router to forward port 22 to the machine you want to access.
In any event, for people here to be able to provide useful input it would be helpful if you posted the command you are running to connect to the machine and the output you get.
Also, on the target machine, run
Code:
iptables -L
and post the output so that we can see if you have any firewall rules that would block the connections.
What distro are you running on the target machine?
What im trying to do is to access my WD MYCLOUD(server) using Putty from home.
I have no static ip so i setup my router to used DDNS(noip).
I already configure the router to forward port 22 to the machine that i want to access.
I successfully connect to the WD MYCLOUD(server) over the private ip LAN using putty as well.
Before i was successfully access my WD MYCLOUD from home then suddenly something went wrong. Thank you everyone!
Before i was successfully access my WD MYCLOUD from home then suddenly something went wrong. Thank you everyone!
Can you try to be a bit more specific? What command did you run, and what was the error message?
Also your setup still is not clear to me. Is the WD MYCLOUD attached to your router, and you are trying to access it from another box that is a client in the same LAN? Or what do you mean by "from home". We have no way of guessing which part of your setup sits at your "home".
Do you have anything that is located at a remote location? (I am assuming you do, otherwise the dynamic dns stuff would not make sense)
I'm using Putty Client to access WD MYCLOUD and i got "network error: connection time out".
The WD MYCLOUD is in the office and attached to the router. I'm trying to access the WD MYCLOUD outside the office.
I saw in the router port forwarding tab that there is a device using ssh.
Can you actually ping the office ip address? Or validate it's correct in any other way?
E.g. check to what ip the dynamic dns hostname resolves and simultaneously ask someone in your office to got to whatismyip.com or a similar site to verify the two ips are the same...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.