Turecko-americká vycházející matematická hvězda Levent Alpöge ze společnosti Anthropic vyvolal pozdvižení oznámením (PDF), že s pomocí superinteligence Claude od Antropicu dokázal vyřešit jeden ze sedmi největších matematických problémů tisíciletí, slavnou Riemannovu hypotézu (prvočísla se mezi čísly objevují zdánlivě nepravidelně, hypotéza tvrdí, že za jejich rozmístěním je určitý řád). Svůj důkaz uvolnil jako open-source
… více »apt-get install scponly dpkg-reconfigure -plow scponlyzvolim "Yes".
cd /usr/share/doc/scponly/setup_chroot sudo gunzip setup_chroot.sh.gz sudo chmod +x setup_chroot.sh sudo ./setup_chroot.shVytvorim tim noveho uzivatele, dejme tomu
sftpuser.
mkdir /home/sftpuser/dev mknod -m 666 /home/sftpuser/dev/null c 1 3Provedu drobnou upravu v
/etc/passwd, asi nejak takhle:
sftpguest:x:1001:1001::/home/sftpguest//incoming:/usr/sbin/scponlycA melo by to jet. Ale pokud se pokusim prihlasit:
sftp -vvv sftpuser@host Connecting to host... OpenSSH_4.6p1 Debian-5, OpenSSL 0.9.8e 23 Feb 2007 debug1: Reading configuration data /home/tom/.ssh/config debug1: Reading configuration data /etc/ssh/ssh_config debug1: Applying options for * debug1: Connecting to kompik [10.0.0.139] port 22. debug1: Connection established. debug1: identity file /home/tom/.ssh/id_rsa type 1 debug1: identity file /home/tom/.ssh/id_dsa type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_4.3p2 Debian-8ubuntu1 debug1: match: OpenSSH_4.3p2 Debian-8ubuntu1 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_4.6p1 Debian-5 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-cbc hmac-md5 none debug1: kex: client->server aes128-cbc hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'host' is known and matches the RSA host key. debug1: Found key in /home/tom/.ssh/known_hosts:1 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received ***************************************************************** *This is a private SSH service. You are not supposed to be here.* *Please leave immediately. * ***************************************************************** debug1: Authentications that can continue: publickey,password debug1: Next authentication method: publickey debug1: Offering public key: /home/tom/.ssh/id_rsa debug1: Authentications that can continue: publickey,password debug1: Trying private key: /home/tom/.ssh/id_dsa debug1: Next authentication method: password sftpuser@host's password: debug1: Authentications that can continue: publickey,password Permission denied, please try again.Heslo zadavam zcela jiste spravne, zkousel sem i zmenit. Pokud se prihlasim lokalne pres
su vse funguje, tedy v ramci scponly shellu.
Druhou veci, kterou jsem slibil zminit na zacatku je skutecnost ktera me pomerne zarazila. Pripojim-li se (k fungujicimu scponly) pres sftp chroot funguje tak jak ma, ale pokud pouziji treba gftp pak se dostanu ven chrootu, je to mozne? Stava se Vam to take?
Dekuji za odpovedi a preju hezky svatecni den.
pepik@juzna.cz's password: debug1: Authentication succeeded (password). debug1: channel 0: new [client-session] debug1: Entering interactive session. debug1: Sending environment. debug1: Sending env LANG = en_US.UTF-8 debug1: Sending subsystem: sftp debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 debug1: channel 0: free: client-session, nchannels 1 debug1: fd 0 clearing O_NONBLOCK debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0 debug1: Exit status 1 Connection closedJe tu nekdo, komu to chodit?
scponlycpotrebuje
/dev/nullv chroot prostredi, takze v chroot adresari staci
mkdir dev
touch dev/nulla
chmod 666 dev/nulla malo by to fungovat, v mojom pripade to pomohlo
Tiskni
Sdílej: