Hey there,
hopefully someone can give me advice how to use the --ssh-args
option when creating a Mender artifact from an golden image.
So I want to create a golden image from a remote device via SSH and using mender-artifact
for this. The device SSH remote connection can just be established via an SSH Keyfile which works fine during default SSH connection and the -i PATH_TO_IDENTITYFILE
parameter, for example:
ssh -i PATH_TO_IDENTITY_FILE USERNAME@IPv4
For mender-artifact
I need to set the Identity File
by the --ssh-args="-o IdentityFile=PATH_TO_IDENTITY_FILE
parameter but this won’t work because mender-artifact says that the key file doesn’t exist.
Also adding an additional option IdentitiesOnly=yes
shows the same error.
Can you help me by enterring a complete command for SSH remote connection via SSH Keyfile?
Complete command with output:
mender-artifact write rootfs-image -f ssh://USER@IPv4 -n NAME --software-version SOFTWARE_VERSION -o file.mender -t TYPE --ssh-args="-o IdentityFile=PATH_TO_IDENTITY_FILE" --ssh-args="-o IdentitiesOnly=yes" no such identity: PATH_TO_IDENTITY_FILE: No such file or directory USER@IPv4: Permission denied (publickey). SSH error: Error waiting for ssh session to be established.: EOF
Thanks.
Andreas