![connect to the SFTP location using Terminal command connect to the SFTP location using Terminal command](https://code2care.org/macos/sftp-using-terminal-command/images/connect to the SFTP location using Terminal command.png)
In order to comment to an SFTP remote location using the Terminal, you can make use of the SFTP Terminal Command by providing the username followed by an @ (at sign) and the domain of the location you want to connect.
% sftp user-name@sftp-server-host-name.com
(user-name@sftp-server-host-name.com) Password:
Connected to sftp-server-host-name.com.
sftp>
You will be prompted to enter the password and once you do that, you will see a message that you are connected and the prompt will change to sftp>
The SFTP protocol makes use of the SSH Protocol for authentication.
If you have the IP address instead of the domain name provided, then you can use username@IP-address instead,
Example: Connect to SFTP destination using IP address,% sftp user@192.168.0.4
(user@192.168.0.4) Password:
Connected to 192.168.0.4
sftp>
✏️ The examples provided were performed on macOS Terminal Zsh Shell, but should work with all Linux/Unix Kernal Shells.
More Posts related to FTP,
- Check help on commands while being on sftp> prompt
- How to connect to SFTP location using Terminal command
- List of 60 useful FTP Client Commands to access server
- 10 FTP SFTP Clients and Alternatives
- How to Copy a remote file to local using SFTP command?
- How to switch between sftp and Terminal shell
- [Solution] SFTP Connection closed File 22 not found
- FileZilla Connection time out Failed to retrieve directory listing
- How to SFTP to port different than 22 (SFTP Custom port)
More Posts:
- Check Bluetooth is turned on or off on Android device programmatically [Java Code] - Android
- How to Subtract Days From Date in Java 8 and Above - Java
- Best Free Gif screen capture app now available for M1 Chip Mac - LICECap - MacOS
- How to check if a Command Exists using Bash Script - Bash
- Change Current User Password using Mac Terminal Command - MacOS
- Install SonarLint on Visual Studio Code - HowTos
- Change default language highlighting in Notepad++ - NotepadPlusPlus
- How to Sort a LinkedList in Java - Java