virtualbox - Connect to Vagrant machine with SSH and custom user -


here problem. after vagrant up in ubuntu 12.04 box, create custom user:

sudo useradd -m user_name 

and add same groups vagrant user. after that, try login ssh can't find way. generate ssh key pair ssh-keygen , , set following option in vagrantfile:

config.ssh.username = "user_name" 

so doing vagrant ssh allows me enter user password , log in user, not directly ssh key pair. think have set config variable:

config.ssh.private_key_path = "" 

but don't know how... path set , place public , private keys. more conceptual problem ssh vagrant, i've been hours, hint? thanks

please refer answer here: ssh onto vagrant box different username

to troubleshoot:

  1. make sure user has login shell grep user_name /etc/passwd | cut -d : -f 7

  2. i haven't tried config.ssh parameters should able test ssh login using

ssh -p 2222 user_name@localhost

or (on linux)

ssh -p 2222 -i /opt/vagrant/embedded/gems/gems/vagrant-1.5.2/keys/vagrant.pub user_name@localhost

if see error messages, enable ssh verbose logging adding -vvv. should able figure out cause , take there.


Comments

Popular posts from this blog

PHPMotion implementation - URL based videos (Hosted on separate location) -

javascript - Using Windows Media Player as video fallback for video tag -

c# - Unity IoC Lifetime per HttpRequest for UserStore -