Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel Homestead SSH

I've having some odd trouble trying to access Laravel Homestead on my local machine through SSH. I can run:

homestead up

with no problems and access my "website.local" through the browser. However when I run:

homestead ssh

OR

vagrant ssh

I receive the following information:

Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-30-generic x86_64)

* Documentation:  https://help.ubuntu.com/

System information as of Fri Jan  2 11:08:55 UTC 2015

System load:  0.0               Processes:           95
Usage of /:   5.1% of 39.34GB   Users logged in:     0
Memory usage: 35%               IP address for eth0: 10.0.2.15
Swap usage:   0%                IP address for eth1: 192.168.10.10

Graph this data and manage this system at:
https://landscape.canonical.com/

Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud


Last login: Fri Jan  2 11:08:55 2015 from 10.0.2.2
Connection to 127.0.0.1 closed.

I must say this is absolutely baffling me as it was working fine as of last night.

like image 509
noobmaster69 Avatar asked Jan 02 '15 11:01

noobmaster69


People also ask

How do I connect to Homestead database?

Connecting To Your Databases To connect to your MySQL or Postgres database from your main machine via Navicat or Sequel Pro, you should connect to 127.0. 0.1 and port 33060 (MySQL) or 54320 (Postgres). The username and password for both databases is homestead / secret .

How do I change PHP version to Homestead?

As a slightly simpler alternative to update-alternatives --config php you can enter the PHP version you want on the command line with a syntax of php71 where 7 is the major version and 1 the minor version. For example to switch to PHP 7.1 from another version simply type php71 .

Where is Homestead Yaml?

The yaml file goes in C:\Users\YourUserName\. homestead\ as mentioned above. What does the YAML file do that the vagrant file does not? The yaml file helps provision the VM by setting up the folders to be mapped for syncing and sets up Nginx to serve the sites that you specify in the yaml file, amongst other things.


1 Answers

First, try the old-fashioned "off and on" again. Restart your machine and then try homestead up again.

The next step would be to destroy and rebuild your Homestead machine. Because all your configuration is in the Homestead.yaml file you won't lose anything (except the contents of any databases). Run homestead destroy and confirm, then homestead up again to rebuild it from scratch.

Alternatively, remove your Homestead configuration with rm -rf ~/.homestead (assuming you're on a Mac). Run homestead init and homestead edit to again configure your machine and finally homestead up to build it all again.

Finally, go and make sure you have installed the latest versions of Vagrant and VirtualBox, then update your Homestead installation with composer global update. Also run homestead update to make sure you've got the latest Homestead image. Then homestead init again to start from scratch running up to date.

like image 100
Dwight Avatar answered Nov 15 '22 12:11

Dwight