Can't send files via ssh (IMX6ULL)

I’m having troubles sending files to my board via ssh.
So i type “scp texto.txt root@172.10.11.1:/home/root” from my computer and this shows:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:6hYE7elfDeHkAB4QU5v5DMK6NrCBSYps8r67+X/XtyQ.
Please contact your system administrator.
Add correct host key in /root/.ssh/known_hosts to get rid of this message.
Offending RSA key in /root/.ssh/known_hosts:1
remove with:
ssh-keygen -f “/root/.ssh/known_hosts” -R “172.10.11.1”

Problem is i can’t find that directory in my board.
I also tried to set “sshd_config” but cant find that file neither.
Typing “root@colibri-imx6ull-07327242:~# ssh root@172.10.11.1 -y” asks me for password and i have set empty password for root, i press enter and it keeps asking me the password.
Worth to mention: If i send a file to my Linux sv the file transfers without any problem.

All i want to do is transfer C programs to the board, and can’t use Toolchain or any of yours other tools, and it’s taking me too much time having to flash the image everytime i compile a new program.
Im a little bit lost in this matter, i’m a novice in Linux and also Toradex so help will be apreciated!

The warning message you are getting typically indicates that the SSH client on your computer has previously connected to a server at that IP address (172.10.11.1), but the server’s identifying key has since changed. This can be due to a number of reasons including reinstallation of the operating system or SSH server, changes in server configuration, etc.
The message is suggesting you to remove the old key on the client side. You can do this by running the suggested command on your local computer:

ssh-keygen -f “/root/.ssh/known_hosts” -R “172.10.11.1”

This command will remove the old key associated with that IP address from your known_hosts file. After running this command, when you try to connect again, you should be prompted to accept the new host key, after which you will be able to connect via SSH without seeing the warning message.
Please note that /root/.ssh/ is a hidden folder.

Regarding the password issue, SSH will ask for a password if it can’t authenticate with keys. If you’re sure you’ve set an empty password for root, ensure that empty passwords are permitted by your SSH configuration. This is typically controlled by the PermitEmptyPasswords option in the sshd_config file. It’s also generally recommended to avoid using an empty password for root due to security reasons.

As a note, -y option is not a valid ssh option.

Could you please provide information about the OS image you’re using on the Colibri iMX6ULL? Additionally, could you clarify what you mean by, “If I send a file to my Linux server, the file transfers without any problem”?

As for file transfer, you can utilize a USB drive or SD card to transfer files to and from the Colibri iMX6ULL, but you’ll need to install a Toolchain or other relevant tools to cross-compile a C program.

The message is suggesting you to remove the old key on the client side. You can do this by running the suggested command on your local computer:

I’ve tried that but then it asks me for password ( i set this this to empty like this in my image recipe EXTRA_USERS_PARAMS = "
usermod -P ‘’ root;
useradd -p 'company ’ company
")
I get this:
root@172.10.11.1’s password:
Permission denied, please try again.

Could you please provide information about the OS image you’re using on the Colibri iMX6ULL? Additionally, could you clarify what you mean by, “If I send a file to my Linux server, the file transfers without any problem”?

What i meant by that is that i can send files to my server from my colibri but not the other way.
Image im using is " iMX6ULL_Reference-Minimal-Image-Tezi_5.7.2-devel-20230608150403+build.0/", maybe if you tell me how can i give you more info i can help.

As for file transfer, you can utilize a USB drive or SD card to transfer files to and from the Colibri iMX6ULL, but you’ll need to install a Toolchain or other relevant tools to cross-compile a C program.

If i can evade doing that would be better, but if there’s no other option ill give it a try!

thanks in advance

If the

ssh-keygen -f “/root/.ssh/known_hosts” -R “172.10.11.1

command fails with “Permission denied” use the

sudo ssh-keygen -f “/root/.ssh/known_hosts” -R “172.10.11.1

Please note it should be run not on Colibri but on your dev machine. I’ve tested the iMX6ULL_Reference-Minimal-Image-Tezi_5.7.2 and scp and ssh work as expected.

scp ./initrd.img root@10.12.1.68:/home/root
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:llvWzVIx0G6b8+5wyyWyTHhkV+wQLQx5JnHza3dyvl4.
Please contact your system administrator.
Add correct host key in /home/alex/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/alex/.ssh/known_hosts:10
remove with:
ssh-keygen -f “/home/alex/.ssh/known_hosts” -R 10.12.1.68
RSA host key for 10.12.1.68 has changed and you have requested strict checking.
Host key verification failed.
lost connection

alex@alex-HP-EliteBook-840-G1:/$ sudo ssh-keygen -f “/home/alex/.ssh/known_hosts” -R 10.12.1.68
[sudo] password for alex:
# Host 10.12.1.68 found: line 10
/home/alex/.ssh/known_hosts updated.
Original contents retained as /home/alex/.ssh/known_hosts.old

alex@alex-HP-EliteBook-840-G1:/$ scp ./initrd.img root@10.12.1.68:/home/root
The authenticity of host ‘10.12.1.68 (10.12.1.68)’ can’t be established.
RSA key fingerprint is SHA256:llvWzVIx0G6b8+5wyyWyTHhkV+wQLQx5JnHza3dyvl4.
Are you sure you want to continue connecting (yes/no)? yes
yes
initrd.img 100% 54Mb 2.7Mb/s 00:20

Thanks for the reply.

I did everything you said but it still gives me errors.

From my linux sv it shows this:

The authenticity of host ‘172.10.11.1 (172.10.11.1)’ can’t be established.
RSA key fingerprint is SHA256:x6LBTmQMLmlrriWYAlie0sYkzyQRCBLftpUryhonlqQ.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added ‘172.10.11.1’ (RSA) to the list of known hosts.
root@172.10.11.1’s password:
Permission denied, please try again.
root@172.10.11.1’s password:
Permission denied, please try again.
root@172.10.11.1’s password:
root@172.10.11.1: Permission denied (publickey,password).

I set the password of the board to something different than empty and disabled autologin to see if i was setting that right and it does log in with the password, problem comes when using ssh as it asks me to put the password and for some reason it seems to be wrong.

I’ve tried to do this in my sv How to Fix SSH Failed Permission Denied (publickey,gssapi-keyex,gssapi-with-mic) (setting sshd_config) but finally i get the same result.
If i try to change some ssh option in the colibri it asks me for password and it happens the same thing than before, it doesn’t "log!.

Thank you for your time!

Are you able to login on UART console using your password?

I can’t login to any of the SSH functions from my colibri, like it keeps asking me to put the password altough im typing the correct one.

It seems like the problem is with your password rather than an SSH issue. You can try to load Toradex Easy Installer and flash a new image where password is not set.

Sorry for late reply, indeed i tried with a new image and ssh worked, so now i have to find the reason why i can’t set the user correctly.

Thank you for all your help!