After successfully establishing a ssh connection between two Ubuntu systems via
ssh [email protected] from a local machine with user name chh2
I tried copying a file from my server with the following command:
scp [email protected]:~/Documents/Steven/prt.csv [email protected]:~/Documents
chh1 is the user of the remote server. chh2 is the local user.
I get the following:
[email protected]'s password: ssh: connect to host 192.168.1.66 port 22: Connection refused lost connection
I ran a ping on both my server and the host and there is no connection problem. I also opened port 22 on both systems via:
firewall-cmd --zone=public --add-port=22/tcp --permanent firewall-cmd --reload
Anyone got any ideas how to solve this?
I might also add that I have no problems reading the file: cat ~/Documents/Steven/prt.csv from the machine I made the connection from.
[email protected]:part from the destination. This is telling scp to make a remote connection to... the computer you're already on. It's not needed, and (apparently) isn't allowed.