No SSH on headless Raspberry Pi Zero 2 W first boot - raspberry-pi

Following the instructions at Alpine Wiki - Raspberry Pi - Headless Installation
I was able to get the Pi to boot up and connected to WiFi. I am able to ping it from my laptop, but not able to SSH into it as root. I keep getting the ssh: connect to host <raspberry-pi-ip-addr> port 22: Connection refused error.
Scanning with Nmap shows no ports are open.
How do I get the SSH server to run?
Or at least enable logs and write to SDCARD such that I can look at what is going wrong.

Related

How to Open Port 1433 on Raspberry Pi?

I have tried to connect to MSSQl Database from raspberry pi. However, I have a few errors coming. I try to telnet the server ip address like that.
telnet 192.168.10.70 1433
Trying 192.168.10.70
Connected to 192.168.10.70
Escape character is '^]'
However,to check if a server has port 1433 listening, I run netstat -ano -p |find “1433” in command prompt but the error is No such file or directory.
So I think running the netstat command on Pi returns no result because there is no port 1433 open on Pi, not server. So anyone knows how to open the port in Pi?
I have used ufw but after it is enabled, I cannot ssh. Do we really need ufw? That's the part I am confusing.

Unable to connect to Raspberry Pi via a Ethernet connection

I've purchased a RaspberryPi 3 B+, booted a NOOBS Raspbian and I've been trying to open a ssh connection via an Ethernet connection for the last couple of days. My goal is to be able to access the Pi via ssh while also sharing my Wifi connection to the Pi. My machine is running Ubuntu 18.04.01.
So far I've tried creating a new Profile for the Ethernet connection but without success. The only way the connection can be "successfully" created is by checking the "Link-Local Only" box, which will add "169.254.154.221" to my IP addresses. However, the Pi can't be found on the local network (pinging raspberrypi.local fails and an nmap scan doesn't return any good results).
Also, when I was first trying to connect the Pi, I was able to see it by executing "arp -a" in terminal, but now it is gone.
I've also tried connecting the Pi to my friend's Macbook and the Pi gets a local IP address, but it is still not possible to share the laptop's internet access to the Pi.

port 22: Permission denied on raspberry 3b

I have installed the 2017-11-29-raspbian-stretch on raspberry 3b, and created a file named ssh in boot directory in SD card, then connected mac with raspberry with an Ethernet cable, I have also turned on Sharing from wifi to Ethernet on mac, but when I wanted connect with raspberry with ssh ssh pi#192.168.2.255 it says "ssh: connect to host 192.168.2.255 port 22: Permission denied".
I have no HDMI cables, what I should do to connect using ssh without visible devices?
It turned out that the Ethernet cable is broken...
Sorry for this question.

Putty gives "Network Error: Connection time out" while connecting to raspberry pi 3 using router in windows

I am using D'link rouer DSL-2750U. I have installed raspbian jessie in Rpi 3 and connected it to router. Connected my laptop to router wifi. But when i try to connect putty using the IP address of raspberrypi which i have got from router admin panel it gives connection time out error. Also i have tried to adjust keepalive seconds in putty connection setting and enabled X11 forwarding.
I recommend you to check if ssh is enabled in your device:
sudo raspi-config
then navigate to ssh, hit Enter and select Enable or disable ssh server. Now reboot raspberry and try again.
Please Open you RaspberryPI terminal and run the command "sudo service ssh restart". Try connect again from putty
For everyone who is getting a network error from Putty even all of their network settings are okay, you just follow a single step:
Just go there in Connection and set the time for 10 sec or more.

Open TCP ports on Raspbian

I am trying to use my raspberry pi as a server, I have a java app using tcp port 1777 and mysql on 3306, however neither one or the other is accessible from lan (both works fine from the pi itself). When I scan the ports open on the pi from my laptop I only see the ssh and vnc ports, but when running the netstat on the pi both ports appear to be in listening state. I am running the latest version of raspbian (image had a ssh and vnc disabled by default, I enabled it in pi configuration (raspi-config)). Any ideas?
In my opinion, check which interface these services are listening on because the services listening on localhost are not 'binded' to the external network so try to make them listening on 192.**** ip address.
Example : Edit MySQL configuration
By default, MySQL is not configured to accept remote connections. You can enable remote connections by modifying the configuration file:
sudo nano /etc/mysql/my.cnf
and set bind-address = 192.** or bind-address = 0.0.0.0 then restart mysql servic:
sudo service mysql restart