{"id":6408,"date":"2021-07-03T17:32:25","date_gmt":"2021-07-03T12:02:25","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=6408"},"modified":"2021-07-03T17:32:31","modified_gmt":"2021-07-03T12:02:31","slug":"error-subsystem-cannot-stat-usr-libexec-openssh-sftp-server-no-such-file-or-directory-subsystem-request-for-sftp-failed-subsystem-not-found","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/error-subsystem-cannot-stat-usr-libexec-openssh-sftp-server-no-such-file-or-directory-subsystem-request-for-sftp-failed-subsystem-not-found\/","title":{"rendered":"error: subsystem: cannot stat \/usr\/libexec\/openssh\/sftp-server: No such file or directory                                             subsystem request for sftp failed, subsystem not found"},"content":{"rendered":"\n<h4 class=\"wp-block-heading\">error: subsystem: cannot stat \/usr\/libexec\/openssh\/sftp-server: No such file or directory <br>subsystem request for sftp failed, subsystem not found<\/h4>\n\n\n\n<h4 class=\"wp-block-heading\">Date: 03-07-2021<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">When i try to connect server via sftp, i get above error. Follow the below steps to solve the error.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM.png\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"76\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM-1024x76.png\" alt=\"\" class=\"wp-image-6412\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM-1024x76.png 1024w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM-300x22.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM-768x57.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM-850x63.png 850w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-5.03.07-PM.png 1048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 1:<\/strong> Login to the server via ssh terminal.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 2: <\/strong>You need to make some changes in the SSHD configuration file by using below command.<br><code><strong># sudo vi \/etc\/ssh\/sshd_config<\/strong><\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Enter <strong><code>\"Subsystem sftp internal-sftp\"<\/code><\/strong> instead of <strong><code>\"Subsystem sftp \/usr\/libexec\/openssh\/sftp-server\"<\/code><\/strong>in the above config file and save and exit.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM.png\"><img decoding=\"async\" width=\"856\" height=\"114\" src=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM.png\" alt=\"\" class=\"wp-image-6409\" srcset=\"https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM.png 856w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM-300x40.png 300w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM-768x102.png 768w, https:\/\/pheonixsolutions.com\/blog\/wp-content\/uploads\/2021\/07\/Screen-Shot-2021-07-03-at-4.57.55-PM-850x113.png 850w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Step 3:<\/strong> Restart the SSH service for new changes to take effect by using below command.<br><strong><code># sudo systemctl restart sshd<\/code><\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you can use SFTP without error. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Thank you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>error: subsystem: cannot stat \/usr\/libexec\/openssh\/sftp-server: No such file or directory subsystem request for sftp failed, subsystem not found Date: 03-07-2021 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1022],"tags":[430,886,887,319],"class_list":["post-6408","post","type-post","status-publish","format-standard","hentry","category-web-architecture","tag-sftp","tag-sftp-connection-error","tag-sftp-failed","tag-ssh","psol-cat-web-architecture"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-1Fm","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=6408"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/6408\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=6408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=6408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=6408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}