Edit files in CentOS VM from the Windows?

General support questions
Post Reply
alexsunny123
Posts: 1
Joined: 2021/05/08 07:08:58

Edit files in CentOS VM from the Windows?

Post by alexsunny123 » 2021/05/08 07:10:28

Hello,

I have a very basic question. I have installed 3 VMs of Cent OS 7 using Virtual Box.
I can ping the 3 VMs from my windows host.
I have also (tried) to install cygwin on my windows host.
I plan to run the VMs in headless mode.

now how can I edit the files inside of my VMs from inside windows?
can I SSH into a VM from my windows terminal (using cygwin) and then edit the files?

Can you please give me the steps so that I can setup this configuration.

I believe there is some complexity of key exchanges and setup before I can login into my VMs from windows.
I also tried to download and install cygwin but it gave me a very long list of software to install... what is the minimum critical components from cygwin which are needed to meet my requirements above?
(BTW, is cygwin really needed? can't I ssh into centos just using windows?

thanks
alexsunny

tunk
Posts: 980
Joined: 2017/02/22 15:08:17

Re: Edit files in CentOS VM from the Windows?

Post by tunk » 2021/05/08 11:35:03

Have hardly used virtualbox, but isn't it possible to access the VM console through virtualbox?

Whoever
Posts: 1207
Joined: 2013/09/06 03:12:10

Re: Edit files in CentOS VM from the Windows?

Post by Whoever » 2021/05/09 02:10:30

alexsunny123 wrote:
2021/05/08 07:10:28

now how can I edit the files inside of my VMs from inside windows?
can I SSH into a VM from my windows terminal (using cygwin) and then edit the files?
Of course you can do this. The difficult part will be tracking the IP addresses, which may change on each boot.

https://phoenixnap.com/kb/how-to-enable-ssh-centos-7

Edit: I would not set the ssh server to listen on a non-standard port. You will have to deal with the SELinux consequences if you do.

User avatar
jlehtone
Posts: 3523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Edit files in CentOS VM from the Windows?

Post by jlehtone » 2021/05/09 09:05:34

alexsunny123 wrote:
2021/05/08 07:10:28
BTW, is cygwin really needed? can't I ssh into centos just using windows?
The cygwin is definitely not needed. Any ssh client is ok. There are many for Windows. For example PuTTY.

Whoever wrote:
2021/05/09 02:10:30
The difficult part will be tracking the IP addresses, which may change on each boot.
Isn't IP address allocation governed by the virtualbox and hence possible to made persistent?

Whoever
Posts: 1207
Joined: 2013/09/06 03:12:10

Re: Edit files in CentOS VM from the Windows?

Post by Whoever » 2021/05/09 15:28:54

jlehtone wrote:
2021/05/09 09:05:34

Isn't IP address allocation governed by the virtualbox and hence possible to made persistent?
Possibly. I don't really know much about VirtualBox.

User avatar
TrevorH
Forum Moderator
Posts: 30759
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Edit files in CentOS VM from the Windows?

Post by TrevorH » 2021/05/09 15:38:43

You can definitely assign static ip addresses to VBox guests and they retain the same MAC address so most DHCP servers will attempt to hand them the same ip they had before.
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3523
Joined: 2007/12/11 08:17:33
Location: Finland

Re: Edit files in CentOS VM from the Windows?

Post by jlehtone » 2021/05/09 16:28:57

Furthermore, a DHCP server that you can't tell to hand out "static" address is pathetic. The "attempt" is what they do with dynamic address pool.

Post Reply

Return to “CentOS 7 - General Support”