[Solution] SFTP Connection closed File 22 not found

SFTP File 22 not found Connection closed
SFTP Connection closed

If you are trying to connect to SFTP address using the command line and SFTP command and you get the error "File "/22" not found." then the reason is that you have tried to provide port 22 which is the default port for SFTP instead of providing the path, you do not need to provide the port number if the server is hosted on the default 22 port.

% sftp demo@code2care.org:22   
(demo@code2care.org) Password: 
Connected to code2care.org.
File "/22" not found.
Connection closed.  

You have provided the port, instead of the directory/path location, user@host:dir-location.


If you want to provide the port you can make use of -P option followed by the port number

% sftp -P 22 user@code2care.com

(user@ Password: 

Connected to code2care.com


Read more: https://code2care.org/macos/sftp-to-different-than-22-custom-post

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap