- Eu posso conectar por ssh e pré-formatar comandos normalmente.
- Só consigo logar se conectar com sucesso pelo WCP. Mas após o login dá esse erro:
Errordetectingvariablecontainingreturncodeoflastcommand.
EupesquiseieeledissequeeuprecisavadesativaroPrintLastLog
noservidor.Entãoeudesabilitei,reinicieioserviço,reinicieioVPSdoOpenVZnoUbuntu16.
Mascontinuamostrandoamensagemdelogin:
Lastlogin:SunJan808:06:132017fromXXX.XXX.XXX.XXXenteredintoXXXXXXX
eaindanãoestoumeconectandocomoWCP.
Esteéomeuarquivovim/etc/ssh/sshd_config
:
#Packagegeneratedconfigurationfile#Seethesshd_config(5)manpagefordetails#Whatports,IPsandprotocolswelistenforPort22#Usetheseoptionstorestrictwhichinterfaces/protocolssshdwillbindto#ListenAddress::#ListenAddress0.0.0.0Protocol2#HostKeysforprotocolversion2HostKey/etc/ssh/ssh_host_rsa_keyHostKey/etc/ssh/ssh_host_dsa_keyHostKey/etc/ssh/ssh_host_ecdsa_keyHostKey/etc/ssh/ssh_host_ed25519_key#PrivilegeSeparationisturnedonforsecurityUsePrivilegeSeparationno#Lifetimeandsizeofephemeralversion1serverkeyKeyRegenerationInterval3600ServerKeyBits1024#LoggingSyslogFacilityAUTHLogLevelINFO#Authentication:LoginGraceTime120PermitRootLoginyesStrictModesyesRSAAuthenticationyesPubkeyAuthenticationyes#AuthorizedKeysFile%h/.ssh/authorized_keys#Don'treadtheuser's~/.rhostsand~/.shostsfilesIgnoreRhostsno#Forthistoworkyouwillalsoneedhostkeysin/etc/ssh_known_hostsRhostsRSAAuthenticationno#similarforprotocolversion2HostbasedAuthenticationno#Uncommentifyoudon'ttrust~/.ssh/known_hostsforRhostsRSAAuthentication#IgnoreUserKnownHostsyes#Toenableemptypasswords,changetoyes(NOTRECOMMENDED)PermitEmptyPasswordsno#Changetoyestoenablechallenge-responsepasswords(bewareissueswith#somePAMmodulesandthreads)ChallengeResponseAuthenticationno#ChangetonotodisabletunnelledcleartextpasswordsPasswordAuthenticationyes#Kerberosoptions#KerberosAuthenticationno#KerberosGetAFSTokenno#KerberosOrLocalPasswdyes#KerberosTicketCleanupyes#GSSAPIoptions#GSSAPIAuthenticationno#GSSAPICleanupCredentialsyesX11ForwardingyesX11DisplayOffset10PrintMotdnoPrintLastLognoTCPKeepAliveyesUseLoginno#MaxStartups10:30:60#Banner/etc/issue.net#AllowclienttopasslocaleenvironmentvariablesAcceptEnvLANGLC_*Subsystemsftp/usr/lib/openssh/sftp-server#Setthisto'yes'toenablePAMauthentication,accountprocessing,#andsessionprocessing.Ifthisisenabled,PAMauthenticationwill#beallowedthroughtheChallengeResponseAuthenticationand#PasswordAuthentication.DependingonyourPAMconfiguration,#PAMauthenticationviaChallengeResponseAuthenticationmaybypass#thesettingof"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