2017-06-11 7 views
-1

私はキーを使って、一度にsshを設定しようとしましたが、一度ユーザ名によってベイグラントボックス弁当/ Ubuntuの-16.04とのみ、このボックスの浮浪者が迷惑メールは作成中でも私のubuntuボックスにsshすることはできません。

を作成しながらも、構築されたVMへのSSHすることはできないだろうとの問題があり、パスワードとまだ同じエラーを取得、ボックスを削除し、再度追加しようとした、同じ問題

使用: - のUbuntu 16.04 Virtualboxの 1.9.4ベイグラント メインOSとして:5.0.40 vagrantbox:弁当/ ubuntu- 16.04 バグのファイル「パスワードを使用するssh」

Vagrant.configure("2") do |config| 
    config.vm.box = "bento/ubuntu-16.04" 
    config.vm.hostname = "myubuntu" 
    config.ssh.username = "soso" 
    config.ssh.password = "soso" 

end 

ここで、上記の迷惑メールファイルを使用して迷路を実行するとどうなりますか。

$vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'bento/ubuntu-16.04'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'bento/ubuntu-16.04' is up to date... 
==> default: Setting the name of the VM: issue_default_1497215548452_86309 
==> default: Fixed port collision for 22 => 2222. Now on port 2202. 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
==> default: Forwarding ports... 
    default: 22 (guest) => 2202 (host) (adapter 1) 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2202 
    default: SSH username: soso 
    default: SSH auth method: password 
[email protected]'s password: 
[email protected]'s password: 
    default: Warning: Authentication failure. Retrying... 
[email protected]'s password: 
[email protected]'s password: 
[email protected]'s password: 
[email protected]'s password: 
    default: Warning: Authentication failure. Retrying... 
[email protected]'s password: 

ここでは、パスワードの入力を求めるときに「--debug」ログの一部です。これはループを維持し、毎秒誇示する。私はそれが関連しているかどうかはわかりません。ここで「放浪isecureキーを使って」

INFO subprocess: Starting process: ["/usr/bin/VBoxManage", "showvminfo", "11fd95c4-1632-4fe9-93d8-4e3641e76b72", "--machinereadable"] 
INFO subprocess: Command not in installer, restoring original environment... 
DEBUG subprocess: Selecting on IO 
DEBUG subprocess: stdout: name="issue_default_1497215719513_409" 
groups="/" 
ostype="Ubuntu (64-bit)" 
UUID="11fd95c4-1632-4fe9-93d8-4e3641e76b72" 
CfgFile="/home/abbas/VirtualBox VMs/issue_default_1497215719513_409/issue_default_1497215719513_409.vbox" 
SnapFldr="/home/abbas/VirtualBox VMs/issue_default_1497215719513_409/Snapshots" 
LogFldr="/home/abbas/VirtualBox VMs/issue_default_1497215719513_409/Logs" 
hardwareuuid="11fd95c4-1632-4fe9-93d8-4e3641e76b72" 
memory=1024 
pagefusion="off" 
vram=8 
cpuexecutioncap=100 
hpet="off" 
chipset="piix3" 
firmware="BIOS" 
cpus=1 
pae="on" 
longmode="on" 
cpuid-portability-level=0 
bootmenu="messageandmenu" 
boot1="disk" 
boot2="dvd" 
boot3="none" 
boot4="none" 
acpi="on" 
ioapic="on" 
biossystemtimeoffset=0 
rtcuseutc="on" 
hwvirtex="on" 
nestedpaging="on" 
largepages="on" 
vtxvpid="on" 
vtxux="on" 
paravirtprovider="default" 
VMState="running" 
VMStateChangeTime="2017-06-11T21:15:21.448000000" 
monitorcount=1 
accelerate3d="off" 
accelerate2dvideo="off" 
teleporterenabled="off" 
teleporterport=0 
teleporteraddress="" 
teleporterpassword="" 
tracing-enabled="off" 
tracing-allow-vm-access="off" 
tracing-config="" 
autostart-enabled="off" 
autostart-delay=0 
defaultfrontend="" 
storagecontrollername0="IDE Controller" 
storagecontrollertype0="PIIX4" 
storagecontrollerinstance0="0" 
storagecontrollermaxportcount0="2" 
storagecontrollerportcount0="2" 
storagecontrollerbootable0="on" 
storagecontrollername1="SATA Controller" 
storagecontrollertype1="IntelAhci" 
storagecontrollerinstance1="0" 
storagecontrollermaxportcount1="30" 
storagecontrollerportcount1="1" 
storagecontrollerbootable1="on" 
"IDE Controller-0-0"="none" 
"IDE Controller-0-1"="none" 
"IDE Controller-1-0"="none" 
"IDE Controller-1-1"="none" 
"SATA Controller-0-0"="/home/abbas/VirtualBox VMs/issue_default_1497215719513_409/ubuntu-16.04-amd64-disk001.vmdk" 
"SATA Controller-ImageUUID-0-0"="ada6bc87-b77f-4697-852d-313419f46319" 
natnet1="nat" 
macaddress1="080027E889C6" 
cableconnected1="on" 
nic1="nat" 
nictype1="82540EM" 
nicspeed1="0" 
mtu="0" 
sockSnd="64" 
sockRcv="64" 
tcpWndSnd="64" 
tcpWndRcv="64" 
Forwarding(0)="ssh,tcp,127.0.0.1,2202,,22" 
nic2="none" 
nic3="none" 
nic4="none" 
nic5="none" 
nic6="none" 
nic7="none" 
nic8="none" 
hidpointing="ps2mouse" 
hidkeyboard="ps2kbd" 
uart1="off" 
uart2="off" 
uart3="off" 
uart4="off" 
lpt1="off" 
lpt2="off" 
audio="pulse" 
clipboard="disabled" 
draganddrop="disabled" 
SessionName="headless" 
VideoMode="800,600,32"@0,0 1 
vrde="on" 
vrdeport=5925 
vrdeports="5925" 
vrdeaddress="127.0.0.1" 
vrdeauthtype="null" 
vrdemulticon="off" 
vrdereusecon="off" 
vrdevideochannel="off" 
vrdeproperty[TCP/Ports]="5925" 
vrdeproperty[TCP/Address]="127.0.0.1" 
usb="off" 
ehci="off" 
xhci="off" 
SharedFolderNameMachineMapping1="vagrant" 
SharedFolderPathMachineMapping1="/home/abbas/issue" 
VRDEActiveConnection="off" 
VRDEClients=0 
vcpenabled="off" 
vcpscreens=0 
vcpfile="/home/abbas/VirtualBox VMs/issue_default_1497215719513_409/issue_default_1497215719513_409.webm" 
vcpwidth=1024 
vcpheight=768 
vcprate=512 
vcpfps=25 
GuestMemoryBalloon=0 
GuestOSType="Linux26_64" 
GuestAdditionsRunLevel=2 
GuestAdditionsVersion="5.1.21 r115005" 
GuestAdditionsFacility_VirtualBox Base Driver=50,1497215732634 
GuestAdditionsFacility_VirtualBox System Service=50,1497215735252 
GuestAdditionsFacility_Seamless Mode=0,1497215732634 
GuestAdditionsFacility_Graphics Mode=0,1497215732634 
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000 
DEBUG subprocess: Exit status: 0 

ベイグラントファイル

Vagrant.configure("2") do |config| 
    config.vm.box = "bento/ubuntu-16.04" 
    config.vm.hostname = "myubuntu" 
    config.ssh.username = "soso" 
    config.ssh.insert_key = false 
    ## making sure it is using the right key 
    config.ssh.private_key_path = '/home/abbas/.vagrant.d/insecure_private_key' 
end 

は、私は上記の放浪ファイルを使用して放浪を実行したときに何が起こるかです。あなたは、自身のアカウントを作成していない限り、ログインするusername独自のものを使用することはできません

$vagrant up 
Bringing machine 'default' up with 'virtualbox' provider... 
==> default: Importing base box 'bento/ubuntu-16.04'... 
==> default: Matching MAC address for NAT networking... 
==> default: Checking if box 'bento/ubuntu-16.04' is up to date... 
==> default: Setting the name of the VM: issue_default_1497216190372_85398 
==> default: Fixed port collision for 22 => 2222. Now on port 2202. 
==> default: Clearing any previously set network interfaces... 
==> default: Preparing network interfaces based on configuration... 
    default: Adapter 1: nat 
==> default: Forwarding ports... 
    default: 22 (guest) => 2202 (host) (adapter 1) 
==> default: Booting VM... 
==> default: Waiting for machine to boot. This may take a few minutes... 
    default: SSH address: 127.0.0.1:2202 
    default: SSH username: soso 
    default: SSH auth method: private key 
    default: Warning: Authentication failure. Retrying... 
    default: Warning: Authentication failure. Retrying... 
    default: Warning: Authentication failure. Retrying... 
+1

スタックオーバーフローは、プログラミングや開発のための質問サイトでログインできるようになります。この質問は、プログラミングや開発に関するものではないので、話題にはならないようです。ヘルプセンターの[ここではどのトピックを参照できますか](http://stackoverflow.com/help/on-topic)を参照してください。おそらく、[Super User](http://superuser.com/)や[Unix&Linux Stack Exchange](http://unix.stackexchange.com/)の方が良いかもしれません。 [Dev Opsについての質問はどこに投稿しますか?](http://meta.stackexchange.com/q/134306)も参照してください。 – jww

答えて

2

。パブリックボックスのデフォルトの規則はvagrantというユーザーを作成することです。明示的に指定しない限り、または特定のユーザーと独自のボックス(パッカーなど)を作成した場合は、vagrantユーザーでログインする必要があります。

あなたconfig.ssh.usernameconfig.ssh.passwordを削除するか、vagrantユーザーと交換してください、それはあなたが

関連する問題