2

When I connect to my site on a free hosting via ssh, connection is instantly closed. If I use filezilla then all is ok, but I need use ssh to run composer install on server.

Here are the logs given below. Maybe anybody can help me.

$ ssh mylogin@address -v
OpenSSH_7.2p2 Ubuntu-4, OpenSSL 1.0.2g-fips  1 Mar 2016
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to address [address] port 22.
debug1: Connection established.
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_rsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /home/vladimir/.ssh/id_ed25519-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4
debug1: Remote protocol version 2.0, remote software version OpenSSH_6.8
debug1: match: OpenSSH_6.8 pat OpenSSH* compat 0x04000000
debug1: Authenticating to address:22 as 'mylogin'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: [email protected]
debug1: kex: host key algorithm: ecdsa-sha2-nistp256
debug1: kex: server->client cipher: [email protected] MAC: <implicit> compression: none
debug1: kex: client->server cipher: [email protected] MAC: <implicit> compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ecdsa-sha2-nistp256  SHA256:CrzG27wkc/axQwXvnC4+WCWdAPW8eL3m5pLfaMvhDdE
debug1: Host 'address' is known and matches the ECDSA host key.
debug1: Found key in /home/vladimir/.ssh/known_hosts:1
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: rekey after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /home/vladimir/.ssh/id_rsa
debug1: Trying private key: /home/vladimir/.ssh/id_dsa
debug1: Trying private key: /home/vladimir/.ssh/id_ecdsa
debug1: Trying private key: /home/vladimir/.ssh/id_ed25519
debug1: Next authentication method: password
mylogin@address's password:


debug1: Authentication succeeded (password).
Authenticated to address ([address]:22).
debug1: channel 0: new [client-session]
debug1: Requesting [email protected]
debug1: Entering interactive session.
debug1: pledge: network
debug1: client_input_global_request: rtype [email protected] want_reply 0
debug1: Sending environment.
debug1: Sending env LANG = ru_RU.UTF-8

Welcome to LTD BeGet server 'free12'
Last login: Thu Aug  4 10:08:44 2016 from myipaddress
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype [email protected] reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to address closed.
Transferred: sent 2160, received 2572 bytes, in 0.8 seconds
Bytes per second: sent 2764.6, received 3291.9
debug1: Exit status 1
11
  • 1
    The service either does not accept shell access or you have misconfigured your ~/.bashrc
    – Jakuje
    Aug 4, 2016 at 14:36
  • I notice that none of the key_load_public lines end with success (1).They all end with failure (-1). On my working ssh access, i see debug1: identity file /home/w3/.ssh/id_rsa type 1. Check ownerships and permissions of ~/.ssh, ~/.ssh/*. Read man ssh-keygen. I think, that once you resolve this problem (nothing but password authentication left), address's behaviour will change. address probably has PasswordAuthentication no (the default) in address::/etc/ssh/sshd_conf. address wants you to use publickey authentication.
    – waltinator
    Aug 4, 2016 at 15:13
  • @waltinator: If the remote host didn't accept password authentication the client wouldn't offer it and furthermore not report that “Authentication succeeded (password).” Also, OP says that “FileZilla” access works which presume means SFTP access. Aug 4, 2016 at 22:34
  • To diagnose if the SSH server allows shell access and has a suitable shell configured, could you please try to connect without starting a shell (-N option)? What's the output ssh -v -N ...? Aug 4, 2016 at 22:38
  • @david-foerster: Right. free12 logs him out right after Last login: Thu Aug 4 10:08:44 2016 from myipaddress.
    – waltinator
    Aug 4, 2016 at 23:52

0

You must log in to answer this question.

Browse other questions tagged .