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.
How do I set up or find out the hostname of my server? I want to set up SSH for my server, have IP address but I understand a hostname is required to set up SSH.
I would guess running an ifconfig and finding out that way what your host name is then open a terminal and input yourusername@hosname like mine for the school computers is
The "hostname" command will tell you the name of your server. Which distro are you running? My server's hostname isn't in any of my SSH config files, so I suspect you're heading down a wrong path
What errors are you getting when you try to SSH to your server? Is sshd running on your server?
If you don't have a static IP(and I'm not talking about 192.168.1.x, unless you're just SSHing from the local network) I mean a static internet IP, then using the hostname to SSH into the server won't work when the internet IP changes...
There are work arounds for this but you have to tell us what you're trying to do here.
I am new on this and starting from zero. I wanted to set up remote access to the terminal session. I am running Fedora 9.
I figured out the hostname issue and checked sshd is running in the server, thank you. I was also able to ssh from another machine within the network using both hostname and IP Address - I'll try the connection from outside the network later on.
One question, I am using SSH Secure Shell to connect from a Windows machine, how do I close or disconnect the connection from the command line?
just type 'exit'. Also ctrl^d also sometimes closes different terminals (not sure if thats intended though).
a hostname or ip address is only needed in the sshd config when you want it to bind to a specific address. For instance, my server currently has two ip address assigned to it. I can make it so only one can be used for ssh. This can be very useful for security.
Thank you. I created user accounts using the graphical interface (System/Administration/Users and Groups). How do I grant system permission to a user accessing via ssh? I need a user to acces remotedly and install an application. Thank you again.
Depending on what distro you are using it should be allowed by default.
If there are restrictions and the person can't connect then this setting could be in a few places. First make sure if there is a group that allows ssh that this member is a part of it. (if you can ssh, look at your group settings)
On my server, i sue this in my sshd_config:
[code]
AllowUsers user1 user1 user2 user3
AllowUsers user1, user2, user3
{/code]
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.