A
A
Alexander2022-03-05 10:48:57
SSH
Alexander, 2022-03-05 10:48:57

How can I directly copy between two servers that I SSH into with my key?

There are two servers A and B. There is a local LM machine. There is one key on the local machine that I use to SSH into both of these servers.

Is there any way to copy files between these servers directly?

Assumption:
Go to server A, then from it somehow go to B. The problem is that the key is only on the local machine. Maybe you can somehow from server A to B, using the SSH connection key from LM to A ....

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2022-03-05
@Survtur

Answer found

# В консоли локальной машине коннектимся к серверу1 с параметром A
# Настройки ключа у меня прописаны в ~/.ssh/config, поэтому их тут нет.
ssh -A [email protected]

# Для проверки работы в консоли сервера1 коннектимся к серверу2 обычной командой
ssh [email protected]

For copying I use mc.
In its left panel is the first server, and in the right - the second one (menu Right → Shell link → [email protected])

D
Drno, 2022-03-05
@Drno

No without adding a key. Only through LM
Or add a key and then you can connect directly from servers

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question