SFTP: Передача файлов в Linux

Contents
Введение
Подключиться к хосту
Отправить файл
Скачать файл
Скачать директорию
Ошибки
Похожие статьи

Введение

Директория, из которой вы запускаете sftp называется рабочей директорией.

Подключиться к хосту по SFTP

Чтобы подключиться к хосту выполните

sftp andrei@10.15.253.206

Connected to 10.15.253.206. sftp>

Чтобы отключиться выполните

exit

Как загрузить файл

Чтобы загрузить файл из рабочей директории на удалённый хост выполните команду put

sftp andrei@10.15.253.206

Connected to 10.15.253.206.

sftp> put testsftp.txt

Uploading testsftp.txt to /home/andrei/testsftp.txt testsftp.txt 100% 1024KB 37.1MB/s 00:00 sftp>

Как скачать файл по scp в Linux

Допустим вам нужно скачать файл p_script.py из папки Downloads с удалённого хоста (192.168.0.2) и положить к себе в текущую директорию.

На удалённом хосте у вас есть пользователь andrei и вы знаете его пароль

scp andrei@192.168.56.2:/home/andrei/Downloads/p_script.py ./

Обратите внимание на ./ в конце - так вы указываете в какую директорию на вашем хосте нужно сохранить файл.

Article author: Andrei Olegovich

Related articles
SFTP: обмен файлами;
SCP: обмен файлами;
SSH
SSH туннель
Ошибки SSH
Linux
Bash
Настройка сети
sudo
C
C++
Сети
Кибербезопасность
RDP через SSH
Telnet
Make

Search this site

Subscribe to Telegram channel @aofeed to follow new articles and updates to old ones

Go to channel

@aofeed

Ask a question in the Telegram group

@aofeedchat

Contacts and cooperation:
I recommend our hosting beget.com
Write to info@aredel.com if you:
1. Want to write an article for our site or translate an article into your native language.
2. Want to place thematically relevant ads on the site.
3. Ads on my site pass maximum censorship. If you see an ad block unsuitable for school-age children, shocking or misleading - please contact us by e-mail
4. Found a mistake, inaccuracy, bug, etc. on the site. ... .......
5. Articles can be shared on social media by clicking a network icon: