SSH auf anderen Port

Einrichten des lokalen Netzes, Verbindung zu anderen Computern und Diensten.
Antworten
RealChaos
Beiträge: 51
Registriert: 24.08.2008 15:05:11

SSH auf anderen Port

Beitrag von RealChaos » 24.08.2008 21:41:32

Hallo,

wie kriege ich es hin, den SSH-Deamon einen anderen Port zu zuweisen?
Ich habe schon versucht den Port in /etc/ssh/sshd_config zu ändern, dass zeigt jedoch keine Wirkung?!
Gibt es noch irgendwas, was ich beachten muss?

Vielen Dank,
RealChaos

P.S.: Das # hab ich natürlich entfernt..

Spasswolf
Beiträge: 3472
Registriert: 30.11.2005 10:32:22
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: Wald

Re: SSH auf anderen Port

Beitrag von Spasswolf » 24.08.2008 21:44:46

Hast du den sshd auch neu gestartet?

RealChaos
Beiträge: 51
Registriert: 24.08.2008 15:05:11

Re: SSH auf anderen Port

Beitrag von RealChaos » 24.08.2008 21:45:17

Klar..
Reboot vom PC hab ich auch schon gemacht..
Immernoch Port 22...

michaa7
Beiträge: 5027
Registriert: 12.12.2004 00:46:49
Lizenz eigener Beiträge: MIT Lizenz

Re: SSH auf anderen Port

Beitrag von michaa7 » 24.08.2008 21:46:06

Was hast du wo entfernt?

so sollte das aussehen:
# What ports, IPs and protocols we listen for
Port <dein neuer port>
Und es ist dir klar, du mußt das auf dem rechner ändern, auf dem der server läuft, nicht auf dem clienten ...
gruß

michaa7

-------------------------------
Menschen ändern gelegentlich ihre Ansichten, aber nur selten ihre Motive. (Oskar Negt)

RealChaos
Beiträge: 51
Registriert: 24.08.2008 15:05:11

Re: SSH auf anderen Port

Beitrag von RealChaos » 24.08.2008 21:51:14

Klar!
Hier mal die Komplette Datei:

Code: Alles auswählen

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
   Port 53421
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes2
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

# This is the ssh client system-wide configuration file.  See
# ssh_config(5) for more information.  This file provides defaults for
# users, and the values can be changed in per-user configuration files
# or on the command line.

# Configuration data is parsed as follows:
#  1. command line options
#  2. user-specific file
#  3. system-wide file
# Any configuration value is only changed the first time it is set.
# Thus, host-specific definitions should be at the beginning of the
# configuration file, and defaults at the end.

# Site-wide defaults for some commonly used options.  For a comprehensive
# list of available options, their meanings and defaults, please see the
# ssh_config(5) man page.

Host *
#   ForwardAgent no
#   ForwardX11 no
#   ForwardX11Trusted yes
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   Port 22
   Port 53421
#   Protocol 2,1
#   Cipher 3des
#   Ciphers aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,arcfour,aes192-cbc,aes2
#   EscapeChar ~
#   Tunnel no
#   TunnelDevice any:any
#   PermitLocalCommand no
    SendEnv LANG LC_*
    HashKnownHosts yes
    GSSAPIAuthentication yes
    GSSAPIDelegateCredentials no

Spasswolf
Beiträge: 3472
Registriert: 30.11.2005 10:32:22
Lizenz eigener Beiträge: MIT Lizenz
Wohnort: Wald

Re: SSH auf anderen Port

Beitrag von Spasswolf » 24.08.2008 21:56:04

Code: Alles auswählen

ssh_config
Du weißt das du die sshd_config ändern musst? ssh_config ist die Konfigurationsdatei für den client.

RealChaos
Beiträge: 51
Registriert: 24.08.2008 15:05:11

Re: SSH auf anderen Port

Beitrag von RealChaos » 24.08.2008 22:00:57

Danke, jetzt geht es :oops:
Wer lesen kann ist klar im Vorteil :D
Was ein Buchstabe alles bewirken kann!

Danke

Antworten