Managing server via SSH

Issues related to configuring your network
Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Managing server via SSH

Post by Mark4785 » 2012/07/15 18:44:10

Hello,

I am trying to connect to a server running Centos 5 via the SSH service using an iMac. I have activated the ssh service and I am allowing inbound access to the service via port 22. Unfortunately, everytime I try to connect to the service via the Mac OS X terminal, Centos is asking for a password. I can't remember having set a password so I was wondering if anybody knew how I could go about finding/working out or changing the SSH password so that I am able to remotely connect to Centos.

Also, I have SSH configured to run at all run levels so will this allow me to connect to Centos via SSH, while it is at the log-in splash screen prior to logging into the system has root?


Thanks,

Mark.

Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Re: Managing server via SSH

Post by Mark4785 » 2012/07/15 19:39:48

Any ideas?

Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Re: Managing server via SSH

Post by Mark4785 » 2012/07/15 20:37:13

I've managed to log in has root remotely via SSH, however I'm only able to achieve this after I go to the Centos host machine and manually log-in has root. Is there anyway to remotely connect to Centos using SSH while it is at the log-in screen?

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Managing server via SSH

Post by TrevorH » 2012/07/17 08:12:32

Make sure that you are using the 'network' service and not "NetworkManager". NetworkManager should only be used for managing wireless connections IMO.

User avatar
jlehtone
Posts: 4523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Managing server via SSH

Post by jlehtone » 2012/07/18 21:48:08

NetworkManager does not tend to be an issue on CentOS 5.


First thing to read: http://wiki.centos.org/HowTos/Network/SecuringSSH

From that you learn that ssh as root is not wise. Login without authentication is even worse.

During installation one has to set the password for root.

Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Re: Managing server via SSH

Post by Mark4785 » 2012/07/22 23:22:00

[quote]
jlehtone wrote:
NetworkManager does not tend to be an issue on CentOS 5.


First thing to read: http://wiki.centos.org/HowTos/Network/SecuringSSH

From that you learn that ssh as root is not wise. Login without authentication is even worse.

During installation one has to set the password for root.[/quote]

Thanks for the link. I have read and completed the steps provided in that document but I am still only able to remotely view, via SSH, CentOS after I have logged in as a standard user. The same was the case for root. What modifications, if any, would I need to do be able to view CentOS via SSH at the log-in screen?


Also, how do I know whether I am using the 'NetworkManager' or 'Network' service?


Mark.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Managing server via SSH

Post by pschaff » 2012/07/23 15:15:32

[quote]
Mark4785 wrote:
Thanks for the link. I have read and completed the steps provided in that document but I am still only able to remotely view, via SSH, CentOS after I have logged in as a standard user. The same was the case for root. What modifications, if any, would I need to do be able to view CentOS via SSH at the log-in screen?[/quote]
By "view" do you mean to log in via ssh?

[quote]
Also, how do I know whether I am using the 'NetworkManager' or 'Network' service?[/quote]
[b]chkconfig --list | grep -i network[/b]

Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Re: Managing server via SSH

Post by Mark4785 » 2012/07/25 19:02:51

[quote]
pschaff wrote:
[quote]
Mark4785 wrote:
Thanks for the link. I have read and completed the steps provided in that document but I am still only able to remotely view, via SSH, CentOS after I have logged in as a standard user. The same was the case for root. What modifications, if any, would I need to do be able to view CentOS via SSH at the log-in screen?[/quote]
By "view" do you mean to log in via ssh?

[quote]
Also, how do I know whether I am using the 'NetworkManager' or 'Network' service?[/quote]
[b]chkconfig --list | grep -i network[/b][/quote]

Yes, by "view" i mean to log in to either root or a standard user account on CentOS via an SSH client on my iMac WHEN CentOS is at the splash screen (log in/welcome screen).

Mark4785
Posts: 167
Joined: 2011/06/24 19:29:42
Location: Derbyshire, UK
Contact:

Re: Managing server via SSH

Post by Mark4785 » 2012/07/25 20:18:59

[quote]
Mark4785 wrote:
[quote]
pschaff wrote:
[quote]
Mark4785 wrote:
Thanks for the link. I have read and completed the steps provided in that document but I am still only able to remotely view, via SSH, CentOS after I have logged in as a standard user. The same was the case for root. What modifications, if any, would I need to do be able to view CentOS via SSH at the log-in screen?[/quote]
By "view" do you mean to log in via ssh?

[quote]
Also, how do I know whether I am using the 'NetworkManager' or 'Network' service?[/quote]
[b]chkconfig --list | grep -i network[/b][/quote]

Yes, by "view" i mean to log in to either root or a standard user account on CentOS via an SSH client on my iMac WHEN CentOS is at the splash screen (log in/welcome screen).[/quote]

I am still having difficulties doing the above. I tried to connect to CentOS (using the SSH port of 22) using the MacOSX terminal over on my iMac, rather than using the 'Chicken of the VNC' client and I got this error message:

"Port forwarding only permitted by root account".

At the time of this connection attempt, the CentOS machine was logged into a standard user account. So my next question is how would I allow port forwarding on a CentOS machine whilst it is at the log-in menu?

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Managing server via SSH

Post by pschaff » 2012/07/27 13:24:08

Please stop quoting entire messages to no good purpose - it just adds noise to the communications channel. If you need to quote for context then trim to the minimum required for clarity.

I've never seen a message "Port forwarding only permitted by root account" and it is unclear where that is coming from. Port forwarding is usually done by a router using NAT to systems on a private LAN.

Aside from that, all I can think to suggest is to provide the information requested about the network and NetworkManager services, and to read:

[url=http://wiki.centos.org/FAQ/CentOS6#head-b67e85d98f0e9f1b599358105c551632c6ff7c90]CentOS-6 FAQ #2 Why does my Ethernet not work unless I log in and explicitly enable it?[/url]

Post Reply