I am trying to upload the file using the terminal to the Ubuntu python3 virtual environment but I am below two getting error.
1. If I am not logged in using the terminal and trying to upload a file xyz@xyzs-MacBook-Air / % scp -r /Users/xyz/Downloads/model/api.py root@myserverip:/home/ubuntu/virtualweb root@myserverip: Permission denied (publickey). scp: Connection closed2. I have logged in in ubuntu using host details ubuntu@ip:~$ scp -r /Users/xyz/Downloads/model/api.py root@ip:/home/ubuntu/virtualweb scp: stat local "/Users/xyz/Downloads/model/api.py": No such file or directory ubuntu@ip:~$
Can I know which is the correct command to upload the file to the Ubuntu server?