Sponsored Content
Full Discussion: ssh on virtual box (4.0.4)
Special Forums IP Networking ssh on virtual box (4.0.4) Post 302649733 by Scott on Friday 1st of June 2012 03:38:44 AM
Old 06-01-2012
Log onto both VMs as the user you want to ssh from / to.

On vm2 and then on vm1:
Code:
ssh-keygen

(press enter a few times)

While still on vm1:
Code:
scp ~user/.ssh/id_rsa.pub user@vm2:/home/user/.ssh/authorized_keys (you need to enter the password)
scp user@vm2:/home/user/.ssh/id_rsa.pub ~user/.ssh/authorized_keys

Change "user" to whatever the username should be.

If .ssh is already configured, then:
Code:
scp ~user/.ssh/id_rsa.pub user@vm2:/home/user/.ssh/key.vm1 (you need to enter the password)
scp user@vm2:/home/user/.ssh/id_rsa.pub ~user/.ssh/key.vm2
cat ~user/.ssh/key.vm1 >> ~user/.ssh/authorized_keys
ssh user@vm2 "cat /home/user/.ssh/key.vm2 >> /home/user/.ssh/authorized_keys"

First check that you can at least ping each VM from the other one.

Last edited by Scott; 07-23-2012 at 05:04 PM.. Reason: Changed first four "ssh" to "scp" ???
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Access files from prev box after SSH to another box

i'm not much of an advanced unix programmer but I'm trying to write a script to access files on box1 after ssh from box 1 to box2. when ssh is invoked in the script i'm getting logged into box2 and losing complete touch with box1 which is normal i guess. but my main aim with my script is when i... (3 Replies)
Discussion started by: pharos467
3 Replies

2. Ubuntu

Virtual Box Screen Display

Hi, Anyone can help me on how to return back to normal size not the full size of my virtual box screen display and also display the menu bar from the top. Thanks in Advance. (4 Replies)
Discussion started by: dba_macau
4 Replies

3. Solaris

virtual box images

Does anyone know if you can use a virtual box image on different O/S's and be able to move it from one server to another of different O/S if needed? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

4. Ubuntu

ip on ubuntu installed using Virtual Box

Hi All I have few computers in the same network using a wifi router. In Each of them I installed VirtualBox and I created an image of Ubuntu 8.04 The thing is that each of those images has the same ip eth0=10.0.2.15. Do you know how can I make possible each virtual machine having another IP or... (2 Replies)
Discussion started by: manustone
2 Replies

5. Windows & DOS: Issues & Discussions

Virtual Box

I am trying to create a new virtual machine (Red Hat) but I am getting the following error I am completely new to VB and I am probably missing something. Any help will be greatly appreciated. (4 Replies)
Discussion started by: Xterra
4 Replies

6. Solaris

Help with mounting a folder-Virtual Box

How do you mount a shared folder within Solaris 10 virtual machine that has been shared by Virtual Box? (1 Reply)
Discussion started by: jastanle84
1 Replies

7. Solaris

how to connect to wireless from virtual box

hi everyone... this is my first post here please help me with this..as iam new to solaris i have installed solaris 10 on virtual box.. and am not able to connect to the internet .. is there anyway i can get connect to the net.. please help me step by step if possible... thanks in... (1 Reply)
Discussion started by: yrajendergoud
1 Replies

8. UNIX for Dummies Questions & Answers

Sun Virtual box

hi Am Using Windows vista machine where i installed Sun Virtual Box on Which i installled Solaris 10.. am not able to ping my windows machine from Sun OS neither viceversa.. Can someone help me out to get this sorted please .... (2 Replies)
Discussion started by: Sojourner
2 Replies

9. Red Hat

cannot ssh (use NFS) on RHEL box, but can mount external & ssh out of RHEL box

Ok, Im trying to get NFS working on my RHEL 5 box, apparently i can use the box as a client, but not as a server. If it helps i cant ssh into the box (server), but as a client ssh works fine. Ive configured server: /etc/hosts.allow: all : all all :all@all setup my /etc/exports file... (4 Replies)
Discussion started by: drs.grid
4 Replies

10. Solaris

Change hostID of Solaris 10 virtual/guest machine installed by Virtual Box 4.1.12 on Windows-XP host

Trying to set or modify the randomly set hostID of a Solaris 10 virtual/guest machine that I installed on a Windows-XP host machine (using Virtual Box 4.1.12). I was able to set/modify the hostname of the Solaris 10 virtual/guest machine during installation as well as via the Virtual Box... (4 Replies)
Discussion started by: Matt_VB
4 Replies
SSH-KEYSIGN(8)						    BSD System Manager's Manual 					    SSH-KEYSIGN(8)

NAME
ssh-keysign -- ssh helper program for host-based authentication SYNOPSIS
ssh-keysign DESCRIPTION
ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication. ssh-keysign is disabled by default and can only be enabled in the global client configuration file /etc/ssh/ssh_config by setting EnableSSHKeysign to ``yes''. ssh-keysign is not intended to be invoked by the user, but from ssh(1). See ssh(1) and sshd(8) for more information about host-based authen- tication. FILES
/etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_ecdsa_key /etc/ssh/ssh_host_ed25519_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, read- able only by root, and not accessible to others. Since they are readable only by root, ssh-keysign must be set-uid root if host- based authentication is used. /etc/ssh/ssh_host_dsa_key-cert.pub /etc/ssh/ssh_host_ecdsa_key-cert.pub /etc/ssh/ssh_host_ed25519_key-cert.pub /etc/ssh/ssh_host_rsa_key-cert.pub If these files exist they are assumed to contain public certificate information corresponding with the private keys above. SEE ALSO
ssh(1), ssh-keygen(1), ssh_config(5), sshd(8) HISTORY
ssh-keysign first appeared in OpenBSD 3.2. AUTHORS
Markus Friedl <markus@openbsd.org> BSD
February 17, 2016 BSD
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy