Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
EEEE... przy zahashowanej tej linijce nadal masz SFTP?
Zrób może test:
sftp localhost
Połóż demona SSH i wykonaj to jeszcze raz
Offline
Nie możliwe a jednak dalej mam sftp
sftp localhost ssh: connect to host localhost port 22: Connection refused Couldn't read packet: Connection reset by peer
Offline
EEE... to co wkleiłeś sugeruje że nie masz :)
Offline
Nie wiem jak ci to pokazać ale dalej potrafię się łączyć przez sftp
Status: Łączenie z 192.168.1.21:2122... Odpowiedź fzSftp started Polecenie: open "server@192.168.1.21" 2122 Polecenie: Ufaj zmienionemu kluczowi hosta: Raz Polecenie: Pass: *** Status: Connected to 192.168.1.21 Status: Uzyskiwanie listy katalogów... Polecenie: pwd Odpowiedź Current directory is: "/home/server" Polecenie: ls Status: Listing directory /home/server Status: Obliczanie przesunięcia czasu serwera... Polecenie: mtime ".bashrc" Odpowiedź 1453297304 Status: Przesunięcie czasu: Serwer: 3600 sekund. Komputer lokalny: 3600 sekund. Różnica: 0 sekund. Status: Listowanie katalogów zakończone pomyślnie
openssh-server : Wymaga: openssh-sftp-server
Więc deinstalacja nic nie da.
Na upartego próbowałem zrobic chroota ale cos mi sie nie udało .
Plik: sshd_config
#MaxStartups 10:30:60 #Banner /etc/issue.net # Allow client to pass locale environment variables AcceptEnv LANG LC_* Subsystem sftp /usr/lib/openssh/sftp-server Match User user ChrootDirectory /home AllowTCPForwarding no X11Forwarding no ForceCommand internal-sftp
Polecenie: open "user@192.168.1.21" 2122 Błąd: Connection refused Błąd: Nie można połączyć się z serwerem Status: Oczekiwanie na ponowienie... Status: Łączenie z 192.168.1.21:2122... Odpowiedź fzSftp started Polecenie: open "user@192.168.1.21" 2122 Błąd: Connection refused Błąd: Nie można połączyć się z serwerem Status: Łączenie z 192.168.1.21:2122... Odpowiedź fzSftp started Polecenie: open "user@192.168.1.21" 2122 Błąd: Connection refused Błąd: Nie można połączyć się z serwerem Status: Oczekiwanie na ponowienie... Status: Łączenie z 192.168.1.21:2122... Odpowiedź fzSftp started Polecenie: open "user@192.168.1.21" 2122 Błąd: Connection refused Błąd: Nie można połączyć się z serwerem
[url]https://www.howtoforge.com/restricting-users-to-sftp-plus-setting-up-chrooted-ssh-sftp-debian-squeeze[/url]
GNU nano 2.2.6 Plik: auth.log Jan 20 20:44:27 serwer sshd[1377]: Accepted password for server from 192.168.1.22 port 34501 ssh2 Jan 20 20:44:27 serwer sshd[1377]: pam_unix(sshd:session): session opened for user server by (uid=0) Jan 20 21:04:15 serwer useradd[2008]: new user: name=proftpd, UID=109, GID=65534, home=/run/proftpd, shell=/bin/false Jan 20 21:04:15 serwer chage[2013]: changed password expiry for proftpd Jan 20 21:04:15 serwer useradd[2018]: new user: name=ftp, UID=110, GID=65534, home=/srv/ftp, shell=/bin/false Jan 20 21:04:16 serwer usermod[2023]: change user 'ftp' password Jan 20 21:04:16 serwer chage[2028]: changed password expiry for ftp Jan 20 21:06:56 serwer sshd[1377]: pam_unix(sshd:session): session closed for user server Jan 20 21:07:18 serwer proftpd: pam_unix(proftpd:session): session opened for user server by (uid=0) Jan 20 21:17:01 serwer CRON[2180]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 20 21:17:01 serwer CRON[2180]: pam_unix(cron:session): session closed for user root Jan 20 21:17:19 serwer proftpd: pam_unix(proftpd:session): session closed for user server Jan 20 22:17:01 serwer CRON[2203]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 20 22:17:01 serwer CRON[2203]: pam_unix(cron:session): session closed for user root Jan 20 22:47:54 serwer sshd[1358]: Received signal 15; terminating. Jan 20 22:47:54 serwer sshd[2229]: Server listening on 0.0.0.0 port 2122. Jan 20 22:47:54 serwer sshd[2229]: Server listening on :: port 2122. Jan 20 22:48:04 serwer sshd[2247]: Accepted password for server from 192.168.1.22 port 55822 ssh2 Jan 20 22:48:04 serwer sshd[2247]: pam_unix(sshd:session): session opened for user server by (uid=0) Jan 20 22:48:04 serwer sshd[2249]: subsystem request for sftp by user server failed, subsystem not found Jan 20 22:50:35 serwer sshd[2229]: Received signal 15; terminating. Jan 20 22:50:46 serwer sshd[2297]: Server listening on 0.0.0.0 port 2122. Jan 20 22:50:46 serwer sshd[2297]: Server listening on :: port 2122. Jan 20 23:00:26 serwer sshd[2297]: Received signal 15; terminating. Jan 21 10:49:25 serwer systemd-logind[477]: New seat seat0. Jan 21 10:49:25 serwer systemd-logind[477]: Watching system buttons on /dev/input/event3 (Power Button) Jan 21 10:49:25 serwer systemd-logind[477]: Watching system buttons on /dev/input/event4 (Video Bus) Jan 21 10:49:25 serwer systemd-logind[477]: Watching system buttons on /dev/input/event1 (Lid Switch) Jan 21 10:49:25 serwer systemd-logind[477]: Watching system buttons on /dev/input/event2 (Power Button) Jan 21 10:49:25 serwer sshd[474]: Server listening on 0.0.0.0 port 2122. Jan 21 10:49:25 serwer sshd[474]: Server listening on :: port 2122. Jan 21 10:49:28 serwer sshd[474]: Received SIGHUP; restarting. Jan 21 10:49:28 serwer sshd[474]: Server listening on 0.0.0.0 port 2122. Jan 21 10:49:28 serwer sshd[474]: Server listening on :: port 2122. Jan 21 10:49:34 serwer sshd[811]: Accepted password for server from 192.168.1.22 port 41499 ssh2 Jan 21 10:49:34 serwer sshd[811]: pam_unix(sshd:session): session opened for user server by (uid=0) Jan 21 10:49:51 serwer sshd[823]: Accepted password for server from 192.168.1.22 port 48575 ssh2 Jan 21 10:49:51 serwer sshd[823]: pam_unix(sshd:session): session opened for user server by (uid=0) Jan 21 10:49:51 serwer sshd[825]: subsystem request for sftp by user server failed, subsystem not found Jan 21 11:17:01 serwer CRON[1034]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 21 11:17:01 serwer CRON[1034]: pam_unix(cron:session): session closed for user root Jan 21 11:56:33 serwer su[1102]: Successful su for root by server Jan 21 11:56:33 serwer su[1102]: + /dev/pts/0 server:root Jan 21 11:56:33 serwer su[1102]: pam_unix(su:session): session opened for user root by server(uid=1000) Jan 21 12:15:26 serwer groupadd[1126]: group added to /etc/group: name=user, GID=1001 Jan 21 12:15:26 serwer groupadd[1126]: group added to /etc/gshadow: name=user Jan 21 12:15:26 serwer groupadd[1126]: new group: name=user, GID=1001 Jan 21 12:15:26 serwer useradd[1130]: new user: name=user, UID=1001, GID=1001, home=/home/user, shell=/bin/bash Jan 21 12:15:32 serwer passwd[1137]: pam_unix(passwd:chauthtok): password changed for user Jan 21 12:15:37 serwer chfn[1138]: changed user 'user' information Jan 21 12:16:00 serwer proftpd: pam_unix(proftpd:session): session opened for user user by (uid=0) Jan 21 12:16:13 serwer proftpd: pam_unix(proftpd:session): session closed for user user Jan 21 12:16:23 serwer sshd[1143]: Accepted password for user from 192.168.1.22 port 39682 ssh2 Jan 21 12:16:23 serwer sshd[1143]: pam_unix(sshd:session): session opened for user user by (uid=0) Jan 21 12:16:23 serwer sshd[1145]: subsystem request for sftp by user user failed, subsystem not found Jan 21 12:17:01 serwer CRON[1148]: pam_unix(cron:session): session opened for user root by (uid=0) Jan 21 12:17:01 serwer CRON[1148]: pam_unix(cron:session): session closed for user root Jan 21 12:17:11 serwer sshd[1143]: pam_unix(sshd:session): session closed for user user Jan 21 12:17:22 serwer sshd[823]: pam_unix(sshd:session): session closed for user server Jan 21 12:21:17 serwer sshd[474]: Received signal 15; terminating. Jan 21 12:21:24 serwer proftpd: pam_unix(proftpd:session): session opened for user user by (uid=0) Jan 21 12:21:28 serwer proftpd: pam_unix(proftpd:session): session closed for user user
I zablokowało mi dostęp do ssh ale już to wszystko przywróciłem do pierwotnej konfiguracji.
Ostatnio edytowany przez tajwan (2016-01-21 12:34:28)
Offline
A spróbuj położyć serwer FTP i zahaszować tamtą linijkę w konfigu ssh. SFTP działa?
Offline
Tak sftp w dalszym ciągu działa.
Offline
A nie prościej skorzystać z http://www.openmediavault.org/?
Bazuje na Debianie.
Ewentualnie: http://www.freenas.org/
Bazuje na FreeBSD
Offline
Time (s) | Query |
---|---|
0.00010 | SET CHARSET latin2 |
0.00004 | SET NAMES latin2 |
0.00133 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.137.180.62' WHERE u.id=1 |
0.00083 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.137.180.62', 1732567379) |
0.00041 | SELECT * FROM punbb_online WHERE logged<1732567079 |
0.00085 | SELECT topic_id FROM punbb_posts WHERE id=296077 |
0.00005 | SELECT id FROM punbb_posts WHERE topic_id=28072 ORDER BY posted |
0.00034 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=28072 AND t.moved_to IS NULL |
0.00028 | SELECT search_for, replace_with FROM punbb_censoring |
0.00535 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=28072 ORDER BY p.id LIMIT 50,25 |
0.00090 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=28072 |
Total query time: 0.01048 s |