Hallo Ubuntugemeinde, ich versuche mich gerade an einer SSH Verbindung zwischen meinem Notebook und meinem PC. Später möchte ich nachdem ich das alles verstanden habe einen Apache Server einrichten den ich dann nur noch der SSH administriere, der dann ohne Grafikkarte, Maus, Tastatur und so auskommt und in unseren Keller kommt.
So jetzt zu meinem Problem.
Ich habe meinen PC (Lubuntu 11.04) mit dem openssh-server paket ausgerüstet und mein Laptop (Ubuntu 11.10 Unity) hat ja das openssh-client paket vorinstalliert.
Folgendes habe ich bisher gemacht: - /etc/ssh/sshd_config auf dem Server geändert:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | # Package generated configuration file # See the sshd_config(5) manpage for details # What ports, IPs and protocols we listen for Port 2450 # Use these options to restrict which interfaces/protocols sshd will bind to #ListenAddress :: #ListenAddress 0.0.0.0 Protocol 2 # HostKeys for protocol version 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key HostKey /etc/ssh/ssh_host_ecdsa_key #Privilege Separation is turned on for security UsePrivilegeSeparation yes # Lifetime and size of ephemeral version 1 server key KeyRegenerationInterval 3600 ServerKeyBits 768 # Logging SyslogFacility AUTH LogLevel INFO # Authentication: LoginGraceTime 120 PermitRootLogin no StrictModes yes RSAAuthentication yes PubkeyAuthentication yes #AuthorizedKeysFile %h/.ssh/authorized_keys # Don't read the user's ~/.rhosts and ~/.shosts files IgnoreRhosts yes # For this to work you will also need host keys in /etc/ssh_known_hosts RhostsRSAAuthentication no # similar for protocol version 2 HostbasedAuthentication no # Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication #IgnoreUserKnownHosts yes # To enable empty passwords, change to yes (NOT RECOMMENDED) PermitEmptyPasswords no # Change to yes to enable challenge-response passwords (beware issues with # some PAM modules and threads) ChallengeResponseAuthentication no # Change to no to disable tunnelled clear text passwords #PasswordAuthentication yes # Kerberos options #KerberosAuthentication no #KerberosGetAFSToken no #KerberosOrLocalPasswd yes #KerberosTicketCleanup yes # GSSAPI options #GSSAPIAuthentication no #GSSAPICleanupCredentials yes X11Forwarding yes X11DisplayOffset 10 PrintMotd no PrintLastLog yes TCPKeepAlive yes #UseLogin no #MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server # Set this to 'yes' to enable PAM authentication, account processing, # and session processing. If this is enabled, PAM authentication will # be allowed through the ChallengeResponseAuthentication and # PasswordAuthentication. Depending on your PAM configuration, # PAM authentication via ChallengeResponseAuthentication may bypass # the setting of "PermitRootLogin without-password". # If you just want the PAM account and session checks to run without # PAM authentication, then enable this but set PasswordAuthentication # and ChallengeResponseAuthentication to 'no'. UsePAM yes |
Wie man sieht ist der Port auf 2450 geändert und der Rootzugriff erstmal ausgeschlossen. Finde ich gar nicht schlecht so für den Test. Des Weiteren habe ich auf meinem Laptop im ~/.ssh/config folgendes stehen:
1 2 3 4 5 6 | #ssh configuration file Host desktop HostName Paul-Desktop.fritz.box Port 2450 Protocol 2 User paul |
Ein Ping funktioniert problemlos:
1 2 3 4 5 6 7 8 9 10 | paul@Laptop:~$ ping Paul-Desktop PING Paul-Desktop.ritz.box (192.168.178.25) 56(84) bytes of data. 64 bytes from Paul-Desktop.fritz.box (192.168.178.25): icmp_req=1 ttl=64 time=109 ms 64 bytes from Paul-Desktop.fritz.box (192.168.178.25): icmp_req=2 ttl=64 time=7.25 ms 64 bytes from Paul-Desktop.fritz.box (192.168.178.25): icmp_req=3 ttl=64 time=2.66 ms 64 bytes from Paul-Desktop.fritz.box (192.168.178.25): icmp_req=4 ttl=64 time=6.46 ms ^C --- Paul-Desktop.fritz.box ping statistics --- 4 packets transmitted, 4 recieved, 0% packet loss, time 3003 ms rrt min/avg/max/mdev = 2.661/31.366/109.086/44.905 ms |
Und wenn ich den eigentlichen SSH befehl versuche passiert so gut wie nichts:
1 2 3 | paul@Laptop:~$ ssh desktop [LANGE passiert nichts] ssh: connect to host Paul-Desktop.fritz.box port 2450: Connection timed out |
Testweise habe ich mal mit firestarter den Server überwacht, aber da scheint keine Verbindung einzugehen...
Der FritzBox habe ich auch schon eine Port beigebracht (s. Anhang) wobei ich mir da nicht sicher bin ob das überhaupt notwendig ist.
Wenn ihr noch weitere Informationen braucht, fragt mich, ich bin über jede Hilfe dankbar...
Danke für das Lesen von dem ganzen...
bangie