SCP in ESXi not working
Asked Answered
B

2

5

Everytime I try to copy files from ESXi machine to other Linux machine it always fails. Either it waits for longer time or ends up with time out error.

Cmd used: scp local_file root@:IP:path/to/folder

cmd err:ssh: connect to host port 22: Connection timed out lost connection

Linux machine has sshd service running.

But, copying from Linux to ESXi works.

Where am I missing in configuration? Thanks in advance !!

Becker answered 20/8, 2017 at 8:54 Comment(0)
C
4

Enable sshClient in the firewall properties of the server.

In vSphere Client select

host -> Configuration -> Security Profile -> Firewall -> Properties

then enable SSH Client to enable outgoing scp connections.

Cal answered 20/8, 2017 at 9:8 Comment(3)
Thanks a lot !! It worked. I was not knowing we have separate ports for outgoing scp connections.Becker
in later vSphere networking > firewall rules > enable (was clicking everywhere looking for this)Tropic
This isn't supported in latest version of vSphere so please use command line.Toxinantitoxin
B
16

Enable SSH client (CLI method).

Check if SSH client service is enabled. Will return 'False' if 'Disabled'.

esxcli network firewall ruleset list --ruleset-id sshClient

Then enable SSH client.

esxcli network firewall ruleset set --ruleset-id sshClient --enabled=true

Basie answered 3/8, 2018 at 8:26 Comment(0)
C
4

Enable sshClient in the firewall properties of the server.

In vSphere Client select

host -> Configuration -> Security Profile -> Firewall -> Properties

then enable SSH Client to enable outgoing scp connections.

Cal answered 20/8, 2017 at 9:8 Comment(3)
Thanks a lot !! It worked. I was not knowing we have separate ports for outgoing scp connections.Becker
in later vSphere networking > firewall rules > enable (was clicking everywhere looking for this)Tropic
This isn't supported in latest version of vSphere so please use command line.Toxinantitoxin

© 2022 - 2024 — McMap. All rights reserved.