A similar question has been asked before: How to set up Raspberry Pi without a monitor?
However, given that the accepted answer doesn't appear to offer an appropriate solution, and given that there's a level of ambiguity in what was being asked, I'm assuming that the original question was mis-constructed, and that my question isn't an exact duplicate.
I'm performing the initial, first-time set-up of a Pi. I don't have a monitor or keyboard, but instead want to use a connected laptop to do the job. I don't want to buy a monitor or keyboard and have them sitting around just for the occasions when they're needed by the Pi. I could borrow them, but I plan to buy more Pi's in the future, and don't want to have to borrow them each time.
I've set a static IP address on the Pi by editing the
cmdline.txt file. (The Pi is running the lastest version of Raspbian.)
I've given the
eth interface on my laptop a corresponding static IP address. (The laptop is running Ubuntu.)
ip ad add 10.0.0.10/24 dev eth0
I've connected the two together with an ethernet cable and can successfully ping the Pi from my laptop.
What I can't do is
ssh to the Pi. I'm getting a Connection refused response:
richard@richard-ThinkPad-X220:~$ ssh -vvv email@example.com OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 19: Applying options for * debug2: ssh_connect: needpriv 0 debug1: Connecting to 10.0.0.20 [10.0.0.20] port 22. debug1: connect to address 10.0.0.20 port 22: Connection refused ssh: connect to host 10.0.0.20 port 22: Connection refused
One thing that this would imply is that
sshd is not yet running on the Pi.
The official docs state that
sshd runs by default, but is it possible that during an initial boot that other things (e.g. prompts waiting for user input) might block the boot at a certain level, meaning we don't reach the point at which
sshd is started?
Where do I go from here? (Not "to the shops to buy a monitor"... )
Is what I'm trying actually possible?
I've now tried the methods mentioned in the answers to the following post, but without success: Enabling SSH on RPi without screen - keystrokes for raspi-config?
Specifically, ensuring that the SSH init script is run at runlevel 2 still didn't allow me to connect.