LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-10-2019, 06:17 PM   #1
webprog24
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
Thumbs up I want to access Linux Ubuntu on my virtual machine per winscp


I set up Linux Ubuntu on a virtual machine. Now I would like to access the server with the WinSCP Explorer. Somehow the connection is always rejected. I already read a lot of info on the internet but nothing really helped. I have also only outbound internet connection. If I try to ping the virtual machine from outside then this does not work.
 
Old 02-10-2019, 06:31 PM   #2
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,389

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Is sshd installed, configured and running on the VM?
 
Old 02-10-2019, 08:18 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,058

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
In addition,

What virtualization software are you running i.e VirtualBox, VMware etc.

It depends on how your virtual machine networking is configured.
 
Old 02-10-2019, 10:26 PM   #4
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,603

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
How did you set up the network?

VM hypervisors provide several methods to connect a VM to the network, for example using NAT or by setting up an isolated network that is not accessible at all from the host.

Last edited by berndbausch; 02-10-2019 at 11:14 PM.
 
Old 02-11-2019, 04:24 PM   #5
webprog24
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
Virtual box

I installed OpenSSL per apt-get-install. And I use VirtualBox. I set the network adapter to Bridget adapter. Additionally to this i setup another Nat adapter.
 
Old 02-11-2019, 04:54 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,058

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
If configured with a bridged adapter your virtual machine will appear on the LAN just like any other device. Make sure that sshd is running and that you allow ssh through the firewall.
 
Old 02-11-2019, 04:59 PM   #7
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora, Alpine, Cirros, OpenSuse/SLES
Posts: 2,603

Rep: Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652Reputation: 652
Quote:
Originally Posted by webprog24 View Post
I installed OpenSSL per apt-get-install. And I use VirtualBox. I set the network adapter to Bridget adapter. Additionally to this i setup another Nat adapter.
I assume the VM host runs Windows, you try to access the VM on its bridged adapter, and you installed ssh, not ssl. Correct?

Does the VM have an IP address at all? You can check with ip address.
If not, give it one, either static or via DHCP, then try again.
If yes, is there any connectivity to the VM from the Windows PC? Use ping to check.
Is the sshd running on the VM? Can you access it with another ssh client such as Putty?
 
Old Today, 03:29 AM   #8
gosul33t
LQ Newbie
 
Registered: Dec 2017
Location: Sofia, Bulgaria
Distribution: Fedora 29
Posts: 1

Rep: Reputation: Disabled
1. Configure your VM's NIC to work in 'bridge' mode so it can get an IP from the host's adapter.
2. Check if service sshd is enabled, if so, if it is started
3. Optionally, you can also check the ssh port (22 is the default one)


I think that pretty much sums it up.
I've tried it, it works.
 
Old Today, 04:07 PM   #9
webprog24
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Original Poster
Rep: Reputation: Disabled
I did all esacly the way described above. I checked with

Quote:
ps -aux | grep ssh
if ssh is installed. It is installed. I did it before with
Quote:
apt-get install openssl-server
I checked if it has an ip address with
Quote:
ip address
and it showed me the static IP 192.168.2.xxx/xx
All seems to be correct but I can not connect to the server with putty or WinSCP also I can not ping the machine from outside. There is still something missing
 
Old Today, 05:03 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 18,058

Rep: Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498Reputation: 2498
Is the ssh server running and is the Ubuntu firewall allowing incoming ssh traffic?
 
Old Today, 05:12 PM   #11
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,389

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Sorry, but I still don't see that you've answered the questions we've asked.
You say you've installed openssl-server -- but that's not sshd -- so, again,
Is sshd installed and running? Yes,
Code:
ps -ef | grep sshd
would tell you if it's running, but better would be
Code:
netstat -tnlp | grep sshd
, which would also confirm it's listening on the default port (22).
In any event, you've only said you ran the ps command, not what the result of it was.

It's also not clear if you've done the things that michaelk and berndbausch have asked you about.

So, still at least a couple of possibilities:
  1. The VM networking is not set up correctly
  2. sshd is not installed, configured, and running on the VM
Either or both of these may be the problem.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Winscp and file permissions when connecting to a Linux machine Kilonova Linux - Server 3 03-29-2018 12:53 AM
using winscp to connect from your host OS to your virtual OS in virtualbox pratikjoshi Linux - Newbie 3 08-25-2013 04:41 AM
Using WinSCP between Linux and XP - Where is the access log? tezarin Linux - Newbie 1 06-04-2012 09:04 AM
copying into Linux machine from windows server without using winscp rkaranjkar Linux - Newbie 3 09-01-2010 03:33 AM
web page database access per page or per session? b0uncer Programming 6 01-13-2007 01:09 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration