Koozali.org: home of the SME Server

[SOLVED] port 22: Connection refused (ssh)

Offline 0Ad^

  • *
  • 17
  • +0/-0
[SOLVED] port 22: Connection refused (ssh)
« on: October 29, 2014, 09:02:46 AM »
Hi Guys,

Good day! I've replace static IP Address of my SME Server 9.0  64bit via terminal with this command & save
Code: [Select]
vi /etc/sysconfig/network-scripts/ifcfg-eth0and confirm save via
Code: [Select]
ifconfig
now I can't connect via ssh with this error:
Code: [Select]
ssh: connect to host XX.XXX.X.X port 22: Connection refused
« Last Edit: October 29, 2014, 09:47:25 AM by 0Ad^ »

Offline Daniel B.

  • *
  • 1,699
  • +0/-0
    • Firewall Services, la sécurité des réseaux
Re: port 22: Connection refused (ssh)
« Reply #1 on: October 29, 2014, 09:31:34 AM »
This is clearly not the way to change IP address of your server. IP configuration must go through the console menu (either login as admin on your server, or login as root and type "console")
C'est la fin du monde !!! :lol:

Offline brianr

  • *
  • 988
  • +2/-0
Re: port 22: Connection refused (ssh)
« Reply #2 on: October 29, 2014, 09:34:51 AM »
Hi Guys,

Good day! I've replace static IP Address of my SME Server 9.0  64bit via terminal with this command & save
Code: [Select]
vi /etc/sysconfig/network-scripts/ifcfg-eth0and confirm save via
Code: [Select]
ifconfig
now I can't connect via ssh with this error:
Code: [Select]
ssh: connect to host XX.XXX.X.X port 22: Connection refused

That command will not change the IPTables  (i.e. firewall) instructions.  You should change the Ip address using the admin console.
Brian j Read
(retired, for a second time, still got 2 installations though)
The instrument I am playing is my favourite Melodeon.
.........

Offline 0Ad^

  • *
  • 17
  • +0/-0
Re: port 22: Connection refused (ssh)
« Reply #3 on: October 29, 2014, 09:45:36 AM »
Thank you Daniel B. & brianr for the effort replying. Problem solved.

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [SOLVED] port 22: Connection refused (ssh)
« Reply #4 on: October 29, 2014, 02:26:16 PM »
Good day! I've replace static IP Address of my SME Server 9.0  64bit via terminal with this command & save
Code: [Select]
vi /etc/sysconfig/network-scripts/ifcfg-eth0

When you opened that file in the editor, there was a big comment block telling you not to manually change the file.

Offline 0Ad^

  • *
  • 17
  • +0/-0
Re: [SOLVED] port 22: Connection refused (ssh)
« Reply #5 on: October 30, 2014, 01:29:10 AM »
yeah, thank for great reminder CharlieBrady, my bad not reading it though I search first at Internet since they said so,

Code: [Select]
#------------------------------------------------------------
#              !!DO NOT MODIFY THIS FILE!!
#
# Manual changes will be lost when this file is regenerated.
#
# Please read the developer's guide, which is available
# at http://www.contribs.org/development/
#
# Copyright (C) 1999-2006 Mitel Networks Corporation
#------------------------------------------------------------

lesson learned to ask first the SME Forum :lol:
« Last Edit: October 30, 2014, 01:30:49 AM by 0Ad^ »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: [SOLVED] port 22: Connection refused (ssh)
« Reply #6 on: October 30, 2014, 03:01:34 AM »
yeah, thank for great reminder CharlieBrady, my bad not reading it though I search first at Internet since they said so...

"they" were referring to CentOS, not SME server.

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: [SOLVED] port 22: Connection refused (ssh)
« Reply #7 on: October 30, 2014, 05:35:26 AM »
0Ad^

Seriously you need to ignore much of the generic advice re Linux when configuring SME server.
Mainly you should learn the SME db system & learn about templates & custom templates & you use these to change most of SME server config files.
There are Howtos on both.
See links at top of Forum
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline 0Ad^

  • *
  • 17
  • +0/-0
Re: [SOLVED] port 22: Connection refused (ssh)
« Reply #8 on: October 30, 2014, 08:10:24 AM »
"they" were referring to CentOS, not SME server.
I'm thinking that since it's base on CentOS, anyway Thank You Charlie.

0Ad^

Seriously you need to ignore much of the generic advice re Linux when configuring SME server.
Mainly you should learn the SME db system & learn about templates & custom templates & you use these to change most of SME server config files.
There are Howtos on both.
See links at top of Forum
oh, much appreciated Janet for this. Thank You