Zugriff auf openssh Server von externer Ip-Adresse
Hi Leute,
versuche mich gerade in openssh for windows und bekomme von extern keinen Zugriff.
Ich möchte von der Arbeit aus auf meinen ssh Server zu Hause zugreifen. Solange ich es vom lokalen Netzwerk aus versuche funktioniert es problemlos, greife ich aber von extern zu erscheint sofort die Fehlermeldung "connection closed"
Das Problem ist nicht der Proxy über den ich zugreife, es gibt nämlich bereits funktionierende Zugriffe von Kollegen auf ihren eigenen ssh Server zu Hause. Nur bei mir klappts nicht.
Es muss an den config files liegen, hier die von server und client (Port 443 ist gewollt und funktioniert auch vom lokalen Netz aus).
Ansonsten bin ich was ssh angeht ein Anfänger und hab ausser dem Port nix geändert. Was muss ich also tun?
Server config:
Port 443
#Protocol 2,1
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_dsa_key
#ServerKeyBits 768
#SyslogFacility AUTH
#LogLevel INFO
#LoginGraceTime 2m
PermitRootLogin yes
RSAAuthentication no
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
#PermitEmptyPasswords no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#GSSAPICleanupCreds yes
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
MaxStartups 10:30:60
________________________________________________
Client config:
versuche mich gerade in openssh for windows und bekomme von extern keinen Zugriff.
Ich möchte von der Arbeit aus auf meinen ssh Server zu Hause zugreifen. Solange ich es vom lokalen Netzwerk aus versuche funktioniert es problemlos, greife ich aber von extern zu erscheint sofort die Fehlermeldung "connection closed"
Das Problem ist nicht der Proxy über den ich zugreife, es gibt nämlich bereits funktionierende Zugriffe von Kollegen auf ihren eigenen ssh Server zu Hause. Nur bei mir klappts nicht.
Es muss an den config files liegen, hier die von server und client (Port 443 ist gewollt und funktioniert auch vom lokalen Netz aus).
Ansonsten bin ich was ssh angeht ein Anfänger und hab ausser dem Port nix geändert. Was muss ich also tun?
Server config:
- This is the sshd server system-wide configuration file. See
- sshd_config(5) for more information.
- This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
- The strategy used for options in the default sshd_config shipped with
- OpenSSH is to specify options with their default value where
- possible, but leave them commented. Uncommented options change a
- default value.
Port 443
#Protocol 2,1
Protocol 2
#ListenAddress 0.0.0.0
#ListenAddress ::
- HostKey for protocol version 1
- HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_dsa_key
- Lifetime and size of ephemeral version 1 server key
#ServerKeyBits 768
- Logging
#SyslogFacility AUTH
#LogLevel INFO
- Authentication:
#LoginGraceTime 2m
PermitRootLogin yes
- The following setting overrides permission checks on host key files
- and directories. For security reasons set this to "yes" when running
- NT/W2K, NTFS and CYGWIN=ntsec.
RSAAuthentication no
#PubkeyAuthentication yes
#AuthorizedKeysFile .ssh/authorized_keys
- For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
- similar for protocol version 2
- Change to yes if you don't trust ~/.ssh/known_hosts for
- RhostsRSAAuthentication and HostbasedAuthentication
- Don't read the user's ~/.rhosts and ~/.shosts files
- To disable tunneled clear text passwords, change to no here!
#PermitEmptyPasswords no
- Change to no to disable s/key passwords
- Kerberos options
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
- GSSAPI options
#GSSAPICleanupCreds yes
- Set this to 'yes' to enable PAM authentication (via challenge-response)
- and session processing. Depending on your PAM configuration, this may
- bypass the setting of 'PasswordAuthentication'
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#KeepAlive yes
#UseLogin no
UsePrivilegeSeparation no
#PermitUserEnvironment no
#Compression yes
#ClientAliveInterval 0
#ClientAliveCountMax 3
#UseDNS yes
#PidFile /var/run/sshd.pid
MaxStartups 10:30:60
- default banner path
- override default of no subsystems
________________________________________________
Client config:
- This is ssh client systemwide configuration file. 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 various options
- Host *
- ForwardAgent no
- ForwardX11 no
- RhostsAuthentication no
- RhostsRSAAuthentication yes
- RSAAuthentication yes
- PasswordAuthentication yes
- FallBackToRsh no
- UseRsh no
- BatchMode no
- CheckHostIP yes
- StrictHostKeyChecking yes
- IdentityFile ~/.ssh/identity
- IdentityFile ~/.ssh/id_dsa
- IdentityFile ~/.ssh/id_rsa
- Port 22
- Protocol 2,1
- Cipher blowfish
- EscapeChar ~
Bitte markiere auch die Kommentare, die zur Lösung des Beitrags beigetragen haben
Content-ID: 61189
Url: https://administrator.de/forum/zugriff-auf-openssh-server-von-externer-ip-adresse-61189.html
Ausgedruckt am: 12.04.2025 um 06:04 Uhr