How solve error with sftp: Couldn't read packet: Connection reset by peer?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I did install sftp on CentOS
and did add new group:
groupadd sftp
did create new user:
useradd -m sftp_user_1 -s /sbin/nologin -g sftp
did create password:
passwd sftp_user_1
did change owner:
chown root /home/sftp_user_1
did change rights:
chmod 750 /home/sftp_user_1
did change owner:
chown sftp_user_1:sftp /home/sftp_user_1
did check user and group:
id sftp_user_1
[root@centos-24 home]# id sftp_user_1
uid=1000(sftp_user_1) gid=1000(sftp) groups=1000(sftp)
did make changes in file /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
did change to
Subsystem sftp internal-sftp
did add in end of file
Match Group sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home/%u
ForceCommand internal-sftp
did restart service
systemctl restart sshd
did try to connect to sftp server and returned error:
[root@centos-24 home]# sftp sftp_user_1@localhost
sftp_user_1@localhost's password:
packet_write_wait: Connection to ::1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer
How solve this problem?
centos sftp
add a comment |Â
up vote
0
down vote
favorite
I did install sftp on CentOS
and did add new group:
groupadd sftp
did create new user:
useradd -m sftp_user_1 -s /sbin/nologin -g sftp
did create password:
passwd sftp_user_1
did change owner:
chown root /home/sftp_user_1
did change rights:
chmod 750 /home/sftp_user_1
did change owner:
chown sftp_user_1:sftp /home/sftp_user_1
did check user and group:
id sftp_user_1
[root@centos-24 home]# id sftp_user_1
uid=1000(sftp_user_1) gid=1000(sftp) groups=1000(sftp)
did make changes in file /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
did change to
Subsystem sftp internal-sftp
did add in end of file
Match Group sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home/%u
ForceCommand internal-sftp
did restart service
systemctl restart sshd
did try to connect to sftp server and returned error:
[root@centos-24 home]# sftp sftp_user_1@localhost
sftp_user_1@localhost's password:
packet_write_wait: Connection to ::1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer
How solve this problem?
centos sftp
You've changed the owner of/home/sftp_user_1
tosftp_user_1
only two steps after you changed it toroot
. Why did you set it toroot
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.
â JigglyNaga
Jun 13 at 12:15
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I did install sftp on CentOS
and did add new group:
groupadd sftp
did create new user:
useradd -m sftp_user_1 -s /sbin/nologin -g sftp
did create password:
passwd sftp_user_1
did change owner:
chown root /home/sftp_user_1
did change rights:
chmod 750 /home/sftp_user_1
did change owner:
chown sftp_user_1:sftp /home/sftp_user_1
did check user and group:
id sftp_user_1
[root@centos-24 home]# id sftp_user_1
uid=1000(sftp_user_1) gid=1000(sftp) groups=1000(sftp)
did make changes in file /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
did change to
Subsystem sftp internal-sftp
did add in end of file
Match Group sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home/%u
ForceCommand internal-sftp
did restart service
systemctl restart sshd
did try to connect to sftp server and returned error:
[root@centos-24 home]# sftp sftp_user_1@localhost
sftp_user_1@localhost's password:
packet_write_wait: Connection to ::1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer
How solve this problem?
centos sftp
I did install sftp on CentOS
and did add new group:
groupadd sftp
did create new user:
useradd -m sftp_user_1 -s /sbin/nologin -g sftp
did create password:
passwd sftp_user_1
did change owner:
chown root /home/sftp_user_1
did change rights:
chmod 750 /home/sftp_user_1
did change owner:
chown sftp_user_1:sftp /home/sftp_user_1
did check user and group:
id sftp_user_1
[root@centos-24 home]# id sftp_user_1
uid=1000(sftp_user_1) gid=1000(sftp) groups=1000(sftp)
did make changes in file /etc/ssh/sshd_config
Subsystem sftp /usr/libexec/openssh/sftp-server
did change to
Subsystem sftp internal-sftp
did add in end of file
Match Group sftp
X11Forwarding no
AllowTcpForwarding no
ChrootDirectory /home/%u
ForceCommand internal-sftp
did restart service
systemctl restart sshd
did try to connect to sftp server and returned error:
[root@centos-24 home]# sftp sftp_user_1@localhost
sftp_user_1@localhost's password:
packet_write_wait: Connection to ::1 port 22: Broken pipe
Couldn't read packet: Connection reset by peer
How solve this problem?
centos sftp
asked Jun 13 at 11:35
Nikolay Baranenko
1097
1097
You've changed the owner of/home/sftp_user_1
tosftp_user_1
only two steps after you changed it toroot
. Why did you set it toroot
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.
â JigglyNaga
Jun 13 at 12:15
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12
add a comment |Â
You've changed the owner of/home/sftp_user_1
tosftp_user_1
only two steps after you changed it toroot
. Why did you set it toroot
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.
â JigglyNaga
Jun 13 at 12:15
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12
You've changed the owner of
/home/sftp_user_1
to sftp_user_1
only two steps after you changed it to root
. Why did you set it to root
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.â JigglyNaga
Jun 13 at 12:15
You've changed the owner of
/home/sftp_user_1
to sftp_user_1
only two steps after you changed it to root
. Why did you set it to root
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.â JigglyNaga
Jun 13 at 12:15
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
In this step
chown root /home/sftp_user_1
I must change and group to sftp
chown root:sftp /home/sftp_user_1
because in file /etc/ssh/sshd_config exist
Match Group sftp
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
In this step
chown root /home/sftp_user_1
I must change and group to sftp
chown root:sftp /home/sftp_user_1
because in file /etc/ssh/sshd_config exist
Match Group sftp
add a comment |Â
up vote
0
down vote
In this step
chown root /home/sftp_user_1
I must change and group to sftp
chown root:sftp /home/sftp_user_1
because in file /etc/ssh/sshd_config exist
Match Group sftp
add a comment |Â
up vote
0
down vote
up vote
0
down vote
In this step
chown root /home/sftp_user_1
I must change and group to sftp
chown root:sftp /home/sftp_user_1
because in file /etc/ssh/sshd_config exist
Match Group sftp
In this step
chown root /home/sftp_user_1
I must change and group to sftp
chown root:sftp /home/sftp_user_1
because in file /etc/ssh/sshd_config exist
Match Group sftp
answered Jun 16 at 15:34
Nikolay Baranenko
1097
1097
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f449518%2fhow-solve-error-with-sftp-couldnt-read-packet-connection-reset-by-peer%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You've changed the owner of
/home/sftp_user_1
tosftp_user_1
only two steps after you changed it toroot
. Why did you set it toroot
in the first place? If you're following a set of instructions you found somewhere, please include that in your question.â JigglyNaga
Jun 13 at 12:15
now did returned error: sftp_user_1@localhost's password: Permission denied, please try again.
â Nikolay Baranenko
Jun 13 at 12:22
use: 'tail -f /var/log/secure /var/log/audit ' and run your sftp call to check if useful messages come there. (and maybe increas loglevel to verbose in sshd_config...)
â tonioc
Jun 16 at 17:12