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.
Well with the above saying it looks like you are struggling to much to setup things and didnt followed a good tutorial or followed a bunch of inappropriate one.
Server is not something you install every day for any small or big issue.
Here is what you can do to make ssh work:
1 remove and reinstall ssh
2 setup sshd_config to listen to teh default port
3 give your machine and network ip info in config file.
4 configure iptables to allow in and out connection to port 22
5 set selinux to permissive
6 start sshd service and if require reboot
Thanks. I just ran through all of these and still not connecting.
Do you connect with.
ssh -l "username" "ip address of server"
or is your user account you attempting to connect with configured on the server?
The user account is configured on my server and my client machine. I've tried ssh hostname, ssh ip , ssh user@hostname, ssh user@ip, and I just tried ssh -l
$ ssh -v 198.100.252.23
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug1: Connecting to 198.100.252.23 [198.100.252.23] port 22.
If that's all you get, then nothing's listening on port 22 at 198.200.252.23.
That's a public IP address (Schaumburg, Illinois?) you're attempting to connect to. Is that address directly assigned to a NIC on one of your systems? Or is it assigned to the broadband router? Earlier you tried connecting to 196.100.2.2, but that address is assigned to AfriNIC (Mauritius). Where does that address come from?
I think we should take this from the start. What's the IP address of the server you're trying to connect to? The address that appears when you type ifconfig on the server?
- You should try ssh localhost first, to make sure that ssh is running and is listening on port 22 before connecting from a remote client(may be the same or different subnet with server).
- Could you post your following debugging log lines rather than just only at "debug1: Connecting to 198.100.252.23 [198.100.252.23] port 22.". We need more lines than that.
$ ssh -v 198.100.252.23
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug1: Connecting to 198.100.252.23 [198.100.252.23] port 22.
Finally got it. Thank you to everyone that helped, all of your advice led me to final conclusion.
In the end, I did a fresh install of Scientific Linux server. Again ,a long story having different issues with different distros and finally found one that installed without any problems on my hardware.
Followed this tutorial step by step on my fresh install:
Now it works. For the record, I was also confused about the ip of my server so that was the biggest issue but then it was compounded by adding incorrect info to a bunch of config files, many of which were unnecessary as I have now learned and I'm sure they caused more problems. Ugghhh!
My last question is should I set up static ip? It seems that my ip is reserved on my router because all of my devices get the same ip every time I reboot them. I'm sure static ip may be helpful but unecessay?
My last question is should I set up static ip? It seems that my ip is reserved on my router because all of my devices get the same ip every time I reboot them. I'm sure static ip may be helpful but unecessay?
It may seem to get the same IP every time, but that's just because IP addresses handed out by a DHCP has a lease time. Once the lease expires, it has to be renewed. Reboot your server (or your router!) at the wrong time and you end up with a different IP address.
You should absolutely configure your server with a static IP address.
I went back and changed the port to a non standard port. I changed 22 in the iptables and sshd_config files. Now I have to use the -p argument for the new port number when I ssh. What do I have to change in the configs so it just looks to the new port without having to -p every time?
It may seem to get the same IP every time, but that's just because IP addresses handed out by a DHCP has a lease time. Once the lease expires, it has to be renewed. Reboot your server (or your router!) at the wrong time and you end up with a different IP address.
You should absolutely configure your server with a static IP address.
This statement is not wrong, its a option but not the only solution.
You can configure in you router that your host macadress should receive the same ip all the time.
It called static ip reciec by dhcp, so the above is correct.
You'll have to use the -p parameter as long as you use a non-standard port number. How else would the ssh client know which port number to use? It can't very well try all 65535 ports and see if one of them happens to host an SSH service.
You'll have to use the -p parameter as long as you use a non-standard port number. How else would the ssh client know which port number to use? It can't very well try all 65535 ports and see if one of them happens to host an SSH service.
Ha, OK. I thought I could specificy the port in a config file but I guess not. I'm learning every day
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.