Mac Book Air - SSH Verbindung geht nicht

R

Robbyn

Registriert
Thread Starter
Dabei seit
03.05.2015
Beiträge
3
Reaktionspunkte
0
Hallo zusammen,

ich bin neu hier und habe das erste mal gefühlt so richtig Probleme mit dem Mac und es wäre schön wenn mir jemand bei meinem Problem hier helfen könnte. Falls ich im falschen Bereich bin, entschuldige ich mich bereits im voraus.

Folgendes Szenario.
Ich habe einen Server auf dem eine Datenbank läuft. Laut meinem Anbieter muss ich eine SSH Verbindung zu diesem Server aufbauen um auf die Datenbank lokal von meinem MacBook darauf zuzugreifen. Das Problem dabei ist das das MacBook mich sofort aus der Verbindung wirft sobald diese erfolgreich aufgebaut wird. Bei einem PC funktioniert dies wunderbar auch im selben Netzwerk weshalb ich ein Router Problem ausschließen kann. Des Weiteren habe ich auch schon die MacBook Firewall deaktiviert um dies auch auszuschließen. Auch daran lag es nicht.

Dann habe ich bei der SSH Verbindung ein paar Debug Informationen aktiviert und folgende Ausgabe bis zur Passwort abfrage bekommen:

Code:
MacBook-Air:~ Robbyn$ ssh -vv benutzername@hostAdresse
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 102: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to host [ip] port 22.
debug1: Connection established.
debug1: identity file /Users/Robbyn/.ssh/id_rsa type -1
debug1: identity file /Users/Robbyn/.ssh/id_rsa-cert type -1
debug1: identity file /Users/Robbyn/.ssh/id_dsa type -1
debug1: identity file /Users/Robbyn/.ssh/id_dsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-6+squeeze5
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze5 pat OpenSSH_5*
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa-cert-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-rsa,ssh-dss-cert-v01@openssh.com,ssh-dss-cert-v00@openssh.com,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hmac-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: kex_parse_kexinit: diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: none,zlib@openssh.com
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: 
debug2: kex_parse_kexinit: first_kex_follows 0 
debug2: kex_parse_kexinit: reserved 0 
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug2: dh_gen_key: priv key bits set: 138/256
debug2: bits set: 519/1024
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA a3:10:66:19:ef:2b:78:d6:a8:9d:89:82:3d:39:f6:17
debug1: Host 'host' is known and matches the RSA host key.
debug1: Found key in /Users/Robbyn/.ssh/known_hosts:1
debug2: bits set: 548/1024
debug1: ssh_rsa_verify: signature correct
debug2: kex_derive_keys
debug2: set_newkeys: mode 1
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug2: set_newkeys: mode 0
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug2: key: /Users/Robbyn/.ssh/id_rsa (0x0),
debug2: key: /Users/Robbyn/.ssh/id_dsa (0x0),
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /Users/Robbyn/.ssh/id_rsa
debug1: Trying private key: /Users/Robbyn/.ssh/id_dsa
debug2: we did not send a packet, disable method
debug1: Next authentication method: password
benutzer@host's password:

Bis dahin geht noch alles gut, doch nach der Passwort Eingabe:

Code:
debug2: we sent a password packet, wait for reply
debug1: Authentication succeeded (password).
Authenticated to host ([ip]:22).
debug1: channel 0: new [client-session]
debug2: channel 0: send open
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug2: callback start
debug2: fd 3 setting TCP_NODELAY
debug2: client_session2_setup: id 0
debug2: channel 0: request pty-req confirm 1
debug1: Sending environment.
debug1: Sending env LANG = de_DE.UTF-8
debug2: channel 0: request env confirm 0
debug2: channel 0: request shell confirm 1
debug2: callback done
debug2: channel 0: open confirm rwindow 0 rmax 32768
debug2: channel_input_status_confirm: type 99 id 0
debug2: PTY allocation request accepted on channel 0
debug2: channel 0: rcvd adjust 2097152
debug2: channel_input_status_confirm: type 99 id 0
debug2: shell request accepted on channel 0
Linux ### 3.19.0-031900-generic #201502091451 SMP Mon Feb 9 14:52:52 UTC 2015 x86_64


The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.


Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sun May  3 12:32:50 2015 from p4fe6ffbb.dip0.t-ipconnect.de
Could not chdir to home directory /home/userFolder: No such file or directory
debug2: channel 0: rcvd eof
debug2: channel 0: output open -> drain
debug2: channel 0: obuf empty
debug2: channel 0: close_write
debug2: channel 0: output drain -> closed
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug2: channel 0: rcvd eow
debug2: channel 0: close_read
debug2: channel 0: input open -> closed
debug2: channel 0: rcvd close
debug2: channel 0: almost dead
debug2: channel 0: gc: notify user
debug2: channel 0: gc: user detached
debug2: channel 0: send close
debug2: channel 0: is dead
debug2: channel 0: garbage collecting
debug1: channel 0: free: client-session, nchannels 1
Connection to host closed.
Transferred: sent 2560, received 2616 bytes, in 0.1 seconds
Bytes per second: sent 29828.5, received 30481.0
debug1: Exit status 1

Ab dann bricht er komplett ab. (Ich habe auch Sicherheitsgründen alle IP Adressen und Hosts entfernt und gegen entsprechende Pseudonyme ausgetauscht.)


Wie gesagt auf Windows Rechnern mit Putty funktioniert die Verbindung perfekt. Nur eben hier nicht was mich dazu bringt zu denken das der Mac dies unterbindet. Nur habe ich bisher im Internet nichts gefunden und hoffe nun hier eine Antwort zu finden.

Ich bedanke mich bereits im voraus für eure mühen und hoffe doch das wir hier eine gemeinsame Antwort finden werden..

Grüße
Robbyn
 
Hi! Schaut so aus, als wäre in der Shell-Konfiguration ein fehlerhafter Eintrag drin:
Code:
Could not chdir to home directory /home/userFolder: No such file or directory
Je nachdem, was dieses Script sonst noch macht, kann es natürlich sein dass du hier gleich wieder ausgeloggt wirst. Oder die Benutzerkonfiguration ist komisch (Shell/Homedir/...)
Eventuell ist im Putty eine Umgebungsvariable gesetzt, so dass dort dieser Verzeichniswechsel unterbleibt?
Poste mal die ~/.bashrc, vielleicht findet man dort was. Und mach ein grep $USER /etc/passwd
 
Hallo und danke für deine Hilfe.

Ich habe denn grep Befehl ausgeführt ohne sichtliches Ergebnis, falls den was passieren sollte :)

Die .bashrc konnte auf meinem Mac nicht gefunden werden, ist also nicht vorhanden.
 
Führ beide Befehle auf dem Debian-System aus ;)
 
Ach So ich selber habe keine Verbindung zum Server. Ist halt nur ein Webpaket von einem Anbieter. Der mir wiederum kein Support für Mac gibt.
 
Zurück
Oben Unten