Anyone can share some common LXC linux template with ssh installed?

quangphuc

New Member
Dec 24, 2016
10
0
1
42
Hi,

After each reinstall or new install OS for LXC machine, always need to install OpenSSH.
Can anyone share some common LXC Linux template with ssh installed?
 
I have been testing proxmox 5 for a month and all templates have SSH installed. it depends on your OS if SSH is installed by default or not. not on the container. also SSH may be disabled by default and needs enabling, but it it usually there.
 
  • Like
Reactions: quangphuc
Hi,

After each reinstall or new install OS for LXC machine, always need to install OpenSSH.
Can anyone share some common LXC Linux template with ssh installed?
update your container list "pveam update"
install a new container based on for example:
Code:
pveam list local
...
local:vztmpl/debian-9.0-standard_9.0-2_amd64.tar.gz          188.48MB

sshd is running without any problems ...
 
  • Like
Reactions: quangphuc
im running command:

Code:
pveam update
Code:
pveam list local
and after create a new LXC container however ssh still not install on it.

DjWvhMW.jpg


On the "New" LXC container has just created, sshd not installed.

GMxGfwP.jpg


Im running proxmox 5-030
root@DC-218:~# pveversion
pve-manager/5.0-30/5ab26bc (running kernel: 4.10.17-2-pve)
 
im running command:

Code:
pveam update
Code:
pveam list local
and after create a new LXC container however ssh still not install on it.

<blockquote class="imgur-embed-pub" lang="en" data-id="a/qjZkd"><a href="//imgur.com/qjZkd"></a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>

On the "New" LXC container has just created, sshd not installed.

<blockquote class="imgur-embed-pub" lang="en" data-id="a/vJoit"><a href="//imgur.com/vJoit"></a></blockquote><script async src="//s.imgur.com/min/embed.js" charset="utf-8"></script>

Im running proxmox 5-030
root@DC-218:~# pveversion
pve-manager/5.0-30/5ab26bc (running kernel: 4.10.17-2-pve)
sorry list command is for already downloaded images ...

Code:
 pveam available --section system
system          alpine-3.3-default_20160427_amd64.tar.xz
system          alpine-3.4-default_20161206_amd64.tar.xz
system          alpine-3.5-default_20170504_amd64.tar.xz
system          archlinux-base_20170704-1_amd64.tar.gz
system          centos-6-default_20161207_amd64.tar.xz
system          centos-7-default_20170504_amd64.tar.xz
system          debian-6.0-standard_6.0-7_amd64.tar.gz
system          debian-7.0-standard_7.11-1_amd64.tar.gz
system          debian-8.0-standard_8.7-1_amd64.tar.gz
system          debian-9.0-standard_9.0-2_amd64.tar.gz
system          fedora-24-default_20161207_amd64.tar.xz
system          fedora-25-default_20170316_amd64.tar.xz
system          gentoo-current-default_20170503_amd64.tar.xz
system          opensuse-42.2-default_20170406_amd64.tar.xz
system          ubuntu-12.04-standard_12.04-1_amd64.tar.gz
system          ubuntu-14.04-standard_14.04-1_amd64.tar.gz
system          ubuntu-16.04-standard_16.04-1_amd64.tar.gz
system          ubuntu-16.10-standard_16.10-1_amd64.tar.gz
system          ubuntu-17.04-standard_17.04-1_amd64.tar.gz
[\code]

download: (also possible in gui browsing local storage ...
[code]
pveam download local debian-9.0-standard_9.0-2_amd64.tar.gz
[\code]
 
  • Like
Reactions: quangphuc
If a template like centos has no sshd ... debian has !

simply follow these steps...
Code:
1) download a normal lxc / openvz template
2) create an lxc container with this template
3) boot it
4) open it (pct enter <id>)
5) install / modificat everything you want
6) remove all network interfaces
7) shutdown the container
8) make a backup with vzdump an select tar.gz
9) move an rename the backupfile from ...../dump/xyz.tar.gz to ..... /templates/cache/name-version.tar.gz
10) use your new template as any other
 
  • Like
Reactions: dm15 and quangphuc
I've just delete all templetes of local storage and download a new teamplate

root@DC-218:~# pveam update
root@DC-218:~# pveam download local centos-6-default_20161207_amd64.tar.xz

and start install new container from NEW template

however nothing change on lxc container
 
I've just delete all templetes of local storage and download a new teamplate

root@DC-218:~# pveam update
root@DC-218:~# pveam download local centos-6-default_20161207_amd64.tar.xz

and start install new container from NEW template

however nothing change on lxc container
follow up my previous post ... cloning ....
 
If a template like centos has no sshd ... debian has !

simply follow these steps...
Code:
1) download a normal lxc / openvz template
2) create an lxc container with this template
3) boot it
4) open it (pct enter <id>)
5) install / modificat everything you want
6) remove all network interfaces
7) shutdown the container
8) make a backup with vzdump an select tar.gz
9) move an rename the backupfile from ...../dump/xyz.tar.gz to ..... /templates/cache/name-version.tar.gz
10) use your new template as any other

That's helpful, I will try now
 
Gerhard's way works fine and with any template.

You can also try to use dab to build your own debian-based templates with predefined software, settings and so on. Also nice.
 
Gerhard's way works fine and with any template.

You can also try to use dab to build your own debian-based templates with predefined software, settings and so on. Also nice.
Fine!

Please mark this thread closed...
 
If a template like centos has no sshd ... debian has !

simply follow these steps...
Code:
1) download a normal lxc / openvz template
2) create an lxc container with this template
3) boot it
4) open it (pct enter <id>)
5) install / modificat everything you want
6) remove all network interfaces
7) shutdown the container
8) make a backup with vzdump an select tar.gz
9) move an rename the backupfile from ...../dump/xyz.tar.gz to ..... /templates/cache/name-version.tar.gz
10) use your new template as any other

I want to use your method but I I'm not sure I understood this step right, "remove all network interfaces".

Are there any other files I need to delete?

Code:
rm /etc/sysconfig/network
rm /etc/hostname
rm /etc/hosts
rm /etc/resolv.conf
rm /etc/sysconfig/network-scripts/*
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!