Jump to content

Hello everyone,

 

problem is as follows: I have raspberry pi runing raspbian and ssh should be enabled (ssh file in boot exists). However if I ry to ssh into the machine it says "connection refused" (pi and my work machine are both in the same network so ports and so on shouldn't be an issue). Since I don't have any way of connecting a monitor to the pi my only option is to take out the sd card and take a look at the config files and so on. Anyone have any suggestions on what I should check for to make it work?

 

Thanks in advance

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to comment
https://linustechtips.com/topic/1372907-ssh-configuration-problem/
Share on other sites

Link to post
Share on other sites

Do you have to correct IP address and is the SSH Daemon running? Since you don't have graphical access this may be something to try:

https://www.raspberrypi.org/documentation/computers/remote-access.html

Quote

For headless setup, SSH can be enabled by placing a file named ssh, without any extension, onto the boot partition of the SD Card. When the Raspberry Pi boots, it looks for the ssh file. If it is found, SSH is enabled and the file is deleted. The content of the file does not matter; it could contain text, or nothing at all.

and if it has internet access of course change the password or make it only valid users have access.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

2 minutes ago, tikker said:

Do you have to correct IP address

yes, IP is static and connection is over ethernet

Quote

is the SSH Daemon running?

How can I check that if I dont have access to the running device?

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to post
Share on other sites

5 minutes ago, tikker said:

I have a 404 error when clicking on that link

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to post
Share on other sites

1 minute ago, SEAL62 said:

I have a 404 error when clicking on that link

Oh right, it should say remote access. Fixed it.

3 minutes ago, SEAL62 said:

How can I check that if I dont have access to the running device?

Not sure if that's possible. If you 100% have the right IP address then connection refused would imply it may not be running though.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

2 minutes ago, tikker said:

Not sure if that's possible. If you 100% have the right IP address then connection refused would imply it may not be running though.

yeah, thats my problem 😄 I can't check if anything is running since I don't have a command line access to the running system and gui acces doesn't work since I don't have a monitor for the pi

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to post
Share on other sites

7 minutes ago, SEAL62 said:

yeah, thats my problem 😄 I can't check if anything is running since I don't have a command line access to the running system and gui acces doesn't work since I don't have a monitor for the pi

You said you have access to the SD card right? That's why I mentioned about that ssh file. Try taking the SD card out and then placing that file where it needs to go according to the documentation.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

3 minutes ago, tikker said:

You said you have access to the SD card right? That's why I mentioned about that ssh file. Try taking the SD card out and then placing that file where it needs to go according to the documentation.

ssh file should be created in the boot partition for the headless install. That's what I did, but ssh still doesn't work.

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to post
Share on other sites

1 hour ago, SEAL62 said:

ssh file should be created in the boot partition for the headless install. That's what I did, but ssh still doesn't work.

Hmm strange. Not quite sure in that case.

Crystal: CPU: i7 7700K | Motherboard: Asus ROG Strix Z270F | RAM: GSkill 16 GB@3200MHz | GPU: Nvidia GTX 1080 Ti FE | Case: Corsair Crystal 570X (black) | PSU: EVGA Supernova G2 1000W | Monitor: Asus VG248QE 24"

Laptop: Dell XPS 13 9370 | CPU: i5 10510U | RAM: 16 GB

Server: CPU: i5 4690k | RAM: 16 GB | Case: Corsair Graphite 760T White | Storage: 19 TB

Link to post
Share on other sites

12 hours ago, SEAL62 said:

Hello everyone,

 

problem is as follows: I have raspberry pi runing raspbian and ssh should be enabled (ssh file in boot exists). However if I ry to ssh into the machine it says "connection refused" (pi and my work machine are both in the same network so ports and so on shouldn't be an issue). Since I don't have any way of connecting a monitor to the pi my only option is to take out the sd card and take a look at the config files and so on. Anyone have any suggestions on what I should check for to make it work?

 

Thanks in advance

 

is the ssh file on the boot folder of the Pi in there with no file extension?

If so you'll need a monitor to connect to the Pi and make sure that the sshd service is running and operating on the port designated.

 

You can check /etc/ssh/ssh_config and check which port it's running.

 

Because it doesnt matter weather your local or not, ports matter and ssh defaults to port 22

Link to post
Share on other sites

7 hours ago, 10leej said:

 

is the ssh file on the boot folder of the Pi in there with no file extension?

If so you'll need a monitor to connect to the Pi and make sure that the sshd service is running and operating on the port designated.

 

You can check /etc/ssh/ssh_config and check which port it's running.

 

Because it doesnt matter weather your local or not, ports matter and ssh defaults to port 22

yes, ssh file is there with no file extension.

config file shows port 22 for ssh, what I meant was that I dont't have to worry about port forwarding or anything since I am not trying to acces the device from outside my home network.

Quote or tag me( @SEAL62 ) if you want me to see your reply

consider a reaction if I was funny, informative, helpful, or agreeable

 

OS: Windows 10 Pro

CPU: Intel i9-9900K GPU: Aorus GeForce RTX 3080 Master Motherboard: Gigabyte Z390 Aorus Master
AIO: Corsair H150i RGB Platinum RAM: Corsair Vengeance RGB Pro 32GB 3000MHz Case: Corsair iCUE 465X RGB PSU: Corsair RM750x White

 

OS: Kali Linux

HP Envy x360 Convertible

CPU: Intel i5-10210U GPU: NVIDIA GeForce MX250 RAM: 16 GB DDR4 2666 SSD: 512GB PCIe

Link to post
Share on other sites

Can you ping the pi's IP without any problems?

If so, can you telnet into its port 22 just to make sure there are no networking realted issues?

FX6300 @ 4.2GHz | Gigabyte GA-78LMT-USB3 R2 | Hyper 212x | 3x 8GB + 1x 4GB @ 1600MHz | Gigabyte 2060 Super | Corsair CX650M | LG 43UK6520PSA
ASUS X550LN | i5 4210u | 12GB
Lenovo N23 Yoga

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×