Open ClifRuns opened 1 year ago
@ClifRuns, sorry you hit a snag. Is your key created correctly and in your ~/.ssh
directory? Also, what is the permissions on your public private key pair in ~/.ssh/
localhost is fine as Vagrant should create a forward port 2222 to the VM running.
When you are on the VM from vagrant ssh, I see you showed trying to access the auth.log
. There should be entries in there from your successful ssh session. Are you saying from your terminal output that there isn't any?
You could try adding debug to your vagrant ssh
command to see what IP it is using.
Can't connect via SSH bender@localhost: ssh -i ~/.ssh/dftd bender@localhost ssh: connect to host localhost port 22: Connection refused Confirmed SSH is up and running on PORT 22. Can't find anything on port 2222. (using apple-silicon Vagrantfile ala vagrant up --provider=parallels) Any suggestions?
$: vagrant ssh-config Host default HostName VM IP ADDRESS User vagrant Port 22 UserKnownHostsFile /dev/null StrictHostKeyChecking no PasswordAuthentication no IdentityFile /Users/wbhm/.vagrant.d/insecure_private_key IdentitiesOnly yes LogLevel FATAL
$: ssh -i ~/.ssh/dftd -p 2222 bender@VM IP ADDRESS ssh: connect to host VM IP ADDRESS port 2222: Connection refused
$:ssh -i ~/.ssh/dftd bender@VM IP ADDRESS The authenticity of host 'VM IP ADDRESS (VM IP ADDRESS)' can't be established. ED25519 key fingerprint is SHA256: FINGERPRINT_REMOVED This key is not known by any other names Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'VM IP ADDRESS' (ED25519) to the list of known hosts. Enter passphrase for key '/Users/wbhm/.ssh/dftd': (bender@VM IP ADDRESS) Verification code: Welcome to Ubuntu 20.04.5 LTS (GNU/Linux 5.4.0-137-generic aarch64)
Support: https://ubuntu.com/advantage
System information as of Wed 15 Feb 2023 06:29:47 PM CST
System load: 0.0 Usage of /: 12.2% of 29.82GB Memory usage: 12% Swap usage: 0% Processes: 129 Users logged in: 0 IPv4 address for eth0: VM IP ADDRESS IPv6 address for eth0: VM_IPv6_ADDRESS
This system is built by the Bento project by Chef Software More information can be found at https://github.com/chef/bento
The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
Any comment? Suggestions on updating the VM FingerPrint Vagrant PORT forwarding ??
By first glance, it seems that vagrant and parallels does not bind SSH port to 2222 outside the VM. I also have a silicon Mac and Parallels. Let me try it over the weekend and see.
OK, going through the exercise again it seems that vagrant and parallels does not use port 2222 as it does with VirtualBox by default. I will make a note in the README on this. Thanks for digging around :)
You're welcome.
I'm curious - what's 'special' about the apple-silicon folder? I tried running Vagrant from a different location and am unable to bring any arm-64 box 'up'? Is there something unique in the .vagrant folder?
Hi @bradleyd Are you still planning to update the readme file? I am not getting yet what I need to change in the vagrant file to get it running with parallels on an M1. Thanks
@Jarmo2 I plan on doing it this weekend. Thanks for the reminder.
Readme is updated for apple silicon
Thanks a lot that. That helps me a lot.
@bradleyd btw, didn't get why we use virtualbox with all hacks but not docker for provider?
@storenth I wanted to show the differences for infrastructure as code. Vagrant launching a VM has a lot in common with using a tool like Terraform or CloudFormation. This was meant to give people, that are not familiar with Docker and still use VMs, a nice build up before introducing the concept IMO.
Book has been great until now, often verbatim identical to my output, but ... now I hit this: begin terminal quote
end terminal quote My guess is that localhost is the physical host, where bender is unknown. Physical host doesn't know the VM exists (not in /etc/hosts), so how could physical host ssh to the VM? Nothing in VM:/var/log/auth.log or VM:/var/log/syslog looks significant to me. May I please request your help in getting this example to succeed? Thank you. begin terminal quote
end terminal quote