CopSSH install guilde in windows.docx
《CopSSH install guilde in windows.docx》由会员分享,可在线阅读,更多相关《CopSSH install guilde in windows.docx(9页珍藏版)》请在冰豆网上搜索。
CopSSHinstallguildeinwindowsCopSSHinstallguilde1.downloadcopsshreleasepackadgeCopsshInstaller.zipfromweb,installdirectlywithdefaultsettingineverystep.press“next”Press“agree”press“Install”finish:
2.replacethecontentof/etc/sshd_configwithfollow#$OpenBSD:
sshd_config,v1.742006/07/1913:
07:
10dtuckerExp$#Thisisthesshdserversystem-wideconfigurationfile.See#sshd_config(5)formoreinformation.#ThissshdwascompiledwithPATH=/bin:
/usr/sbin:
/sbin:
/usr/bin#Thestrategyusedforoptionsinthedefaultsshd_configshippedwith#OpenSSHistospecifyoptionswiththeirdefaultvaluewhere#possible,butleavethemcommented.Uncommentedoptionschangea#defaultvalue.#Port22#Protocol2,1#AddressFamilyany#ListenAddress0.0.0.0#ListenAddress:
#HostKeyforprotocolversion1#HostKey/etc/ssh_host_key#HostKeysforprotocolversion2#HostKey/etc/ssh_host_rsa_key#HostKey/etc/ssh_host_dsa_key#Lifetimeandsizeofephemeralversion1serverkey#KeyRegenerationInterval1h#ServerKeyBits768#Logging#obsoletesQuietModeandFascistLogging#SyslogFacilityAUTH#LogLevelINFO#Authentication:
#LoginGraceTime2m#PermitRootLoginyes#StrictModesyes#MaxAuthTries6#RSAAuthenticationyes#PubkeyAuthenticationyes#AuthorizedKeysFile.ssh/authorized_keys#Forthistoworkyouwillalsoneedhostkeysin/etc/ssh_known_hosts#RhostsRSAAuthenticationno#similarforprotocolversion2#HostbasedAuthenticationno#Changetoyesifyoudonttrust/.ssh/known_hostsfor#RhostsRSAAuthenticationandHostbasedAuthentication#IgnoreUserKnownHostsno#Dontreadtheusers/.rhostsand/.shostsfiles#IgnoreRhostsyes#Todisabletunneledcleartextpasswords,changetonohere!
#PasswordAuthenticationyesPermitEmptyPasswordsyes#Changetonotodisables/keypasswords#ChallengeResponseAuthenticationyes#Kerberosoptions#KerberosAuthenticationno#KerberosOrLocalPasswdyes#KerberosTicketCleanupyes#KerberosGetAFSTokenno#GSSAPIoptions#GSSAPIAuthenticationno#GSSAPICleanupCredentialsyes#SetthistoyestoenablePAMauthentication,accountprocessing,#andsessionprocessing.Ifthisisenabled,PAMauthenticationwill#beallowedthroughtheChallengeResponseAuthenticationand#PasswordAuthentication.DependingonyourPAMconfiguration,#PAMauthenticationviaChallengeResponseAuthenticationmaybypass#thesettingofPermitRootLoginwithout-password.#IfyoujustwantthePAMaccountandsessioncheckstorunwithout#PAMauthentication,thenenablethisbutsetPasswordAuthentication#andChallengeResponseAuthenticationtono.#UsePAMno#AllowTcpForwardingyes#GatewayPortsno#X11Forwardingno#X11DisplayOffset10#X11UseLocalhostyes#PrintMotdyes#PrintLastLogyes#TCPKeepAliveyes#UseLoginno#UsePrivilegeSeparationyes#PermitUserEnvironmentno#Compressiondelayed#ClientAliveInterval0#ClientAliveCountMax3#UseDNSyes#PidFile/var/run/sshd.pid#MaxStartups10#PermitTunnelno#nodefaultbannerpath#Banner/some/path#overridedefaultofnosubsystemsSubsystemsftp/bin/sftp-server#Exampleofoverridingsettingsonaper-userbasis#MatchUseranoncvs#X11Forwardingno#AllowTcpForwardingno#ForceCommandcvsserver3.Activeminacomuserwithoutdogeneratepairkeysmethod1:
usewindowsmethodnote:
thekeysforpublickeyauthenticationwillbegenerateinprobeside,formoreinformation,pleasereferencetheZoeyV2_Installation_DQandProbewithxml.docPressnext,copSSHwillautomaticallygeneratethefoldersandsetaseriesauthorizesettings.4.copythepublickeysfromprobein/home/minacom/.sshandchangednametoauthorized_keysOk,youcanusesftpasclienttologininsshserverbyminacomnow.5.Ifyouwantdeactiveminacom,justusedeactivetoolslikefollow6.youmayactivetheminacomuserinscriptbyfollowcommand:
a.openacommandpromptandcdintothebindirectoryofcopssh.b.executefollowcommandtoactiveordeactiveC:
ProgramFilescopSSHbincopsshadm-cactivateuser-uminacom-shell/bin/sftponlyC:
ProgramFilescopSSHbincopsshadm-cdeactivateuser-uminacom-shell/bin/sftponly