1

I'm new to linux and I want to connect from my terminal to centos that I installed in virtualbox but it take too long and I have to stop it what should I do?

1
  • what sort of networking did you setup for the virt?
    – thrig
    Jan 8, 2018 at 16:47

2 Answers 2

2

Two very important things:

1) Make sure that you have the OpenSSH server installed 2) On your VirtualBox VM, make sure that your NIC is in 'bridged' mode or whatever terminology that VirtualBox uses so that your VM has an IP address on your local network

1
  • I did this things
    – Masoud
    Jan 8, 2018 at 16:55
1

Could be tuns of things in here.

Check communication between machines.

From Ubuntu ping CentOS IP
$ ping xxxx.xxxx.xxxx.xxxx

Check if SSH is installed

In CentOS
$ sudo rpm -q openssh

Check your firewall, see if SSH connections are accepted (port 22).

In CentOS
$ sudo iptables -L 

Check if ssh service is running

In CentOS
$ sudo service sshd status

Check port listening (default 22)

IN CentOS
$ sudo netstat -tulpn

If all of this are correct, troubleshoot with logs. See in real time what happens when "sshing" to the server.

IN CentOS
$ sudo tail -f /var/log/secure

look for your user and|or IP address.

SSH with verbose mode in order to see where is getting stuck.

IN Ubuntu
$ ssh -vvv user@ipaddress
4
  • ping running correctly
    – Masoud
    Jan 8, 2018 at 16:58
  • service running
    – Masoud
    Jan 8, 2018 at 16:58
  • it's work now but after 1 min why take so long?
    – Masoud
    Jan 8, 2018 at 17:00
  • thank you your answer but I don;t understand some of them because I'm newbie
    – Masoud
    Jan 8, 2018 at 17:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .