[Solution] SFTP File 22 not found Connection closed


SFTP File 22 not found Connection closed
SFTP File 22 not found Connection closed
PS|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.

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

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

Solution:

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

Example:
% sftp -P 22 user@code2care.com

(user@192.168.0.4) Password: 

Connected to code2care.com

sftp> 

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

Advertisements
Try Out Code2care Dev Tools:

Advertisements



#Android #Java #Linux #Microsoft #Google #Python #MacOS #Notepad++ #Microsoft Teams #CSS #PHP #SharePoint #Html #Linux #C-Program #Bootstrap #jQuery #Sublime #Android-Studio #Facebook #Eclipse #WhatsApp #News #MySQL #Json #HowTos #JavaScript #FTP #S3


Advertisements


Code2care is an initiative to publish and share varied knowledge in programming and technical areas gathered during day-to-day learnings and development activities.

Students and Software Developers can leverage this portal to find solutions to their various queries without re-inventing the wheel by referring to our easy to understand posts. Technical posts might include Learnings, Tutorials, Trouble-Shooting steps, Video Tutorials, Code Snippets, How Tos, Blogs, Articles, etc.
🎉 We are celebrating the 10th years of Code2care! Thank you for all your support! We hope we made a difference.
We strong support Gender Equality & Diversity.

We stand in solidarity with Ukraine - Make a donation to UNHCR - https://donate.unhcr.org/in/en-in/ukraine-emergency