Nocxy wrote: ↑
Mon Apr 29, 2019 2:16 pm
As I mentioned, I hid it because it was my external IP.
Do you know why I can't transfer this file from the Pi to my computer ?
I don't understand which third column you're talking about.
To get ssh to work you need to take one step at a time, be aware of where you are and where you want to go, and where the services are located. When you do not succeed then gather information, make it presentable and ask for help.
The first information you should provide is what you have installed on the raspberry pi/PC, this may not be relevant but it can help.
What we would like to know is how the raspberry pi is connected to the network and the IP address / subnet mask
The next piece of information would be what is the operating system installed on the (client) PC and how this device is connected to the network and the IP address / subnet mask
Important: do not hide any information if you are using a network like 192.168.x.x
Are both devices in the same subnet ? That means IP addresses in the same network using the same subnet mask ?
The first test is to confirm that the (client) PC can communicate to the Raspberry Pi within the local network.
Before you start change the ssh port on the Raspberry back to 22, there is no need to hide the internal port number
Use the ssh on your PC to connect to the raspberry pi, if this is not successful use -v and show the result in your reply.
About your scp problem: did you read the error message ? Where is the file you would like to transfer ? (and why)
You must be aware that scp from the raspberry pi to your PC requires that sshd (or similar) must be running on your PC.
If you do not have an sshd service installed on your PC you will not be able to connect to the PC.
If you local test was successful change the port forwarding on your router to forward external port 2400 to the internal IP address of your raspberry pi on port 22. Then use your phone as a mobile access point for your PC. Try ssh using the external address with port 2400.
Important: You can not connect to the Pi using the external address when the PC is connected to the local network , your PC must be connected to the external network (aka internet).
Note: depending on your router / mobile access point both the PC and the raspberry pi may show a similar network, this is not wrong because the router and the access point will translate the internal addresses for external communication.
Final note: are you sure that you want the whole world trying to break into your raspberry pi ? Even with a changed port you must be aware that there will be attempts to connect. It is highly recommended to change the password to something very difficult, it is even more recommended to disable ssh password access on the pi and to use public/private keys only.