0

I've never used the bash language before (is scp -r part of bash?) and there's a C++ Xcode file I want to copy to a different IDE (more specifically for a robot controller). That C++ file is in a folder, and I heard that you use scp -r for folders? So I tried using that: scp -r Desktop/oroni-club/gyro.cpp [email protected]:"[path]" The host key is the IP address of the controller, and I'm not quite sure what "[path]" is, someone just told me to use that.

I also keep getting this error: Host key verification failed. lost connection, and it doesn't end up copying the C++ file to the other IDE.

I'm not sure what to do and how to copy a C++ file to this other non C++ IDE (this one only offers C and Python, but you can still add a C++ file using bash through the terminal), I'm completely new to this...

1
  • BTW, you want to replace [path] with the actual path on the remote server's filesystem where you want the file to be placed. By default the path is relative to the home directory of the account you're connecting to on the server. In your example, that's the root (super user) account, whose home directory might be something like /home/root or /var/root depending on the OS of the target host and how it's configured. Commented Nov 4, 2019 at 20:34

1 Answer 1

0

The host key is an RSA (or DSA, or Elliptic Curve) public key by which the ssh/scp server (the one running sshd) authenticates itself to your ssh/scp client, so you know you're not connecting to an impostor server. Your ssh/scp client will ask you, the first time you connect to a new server, if you want to accept the offered host key. If you accept it, it's stored in ~/.ssh/known_hosts so it can be used to authenticate that host in the future.

If you're sure you're not dealing with a Man-in-the-Middle attack or other impostor, you can clear out the host key you'd previously cached for that hostname or IP address by editing ~/.ssh/known_hosts to remove the line for that host, or you can use ssh-keygen -R hostname to remove it. If you always connect by IP address, then use that IP address instead of a hostname as your argument to ssh-keygen -R ….

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.