[TUTORIAL] One liner alias to ssh into running containers from host (linux)

leodom

Member
Jul 25, 2015
10
0
21
Moorea Island
Since I got bored of having to type pct enter xxx each time,
I added an alias in .bashrc :
Bash:
alias p='PS3=" Which VM ? " ; select vm in $(pct list | grep running | sort -n | tr -s '\'' '\'' |  cut -d " " -f1,3 | tr '\'' '\'' .) ; do pct enter ${vm:0:3} ; break ; done'
Now, when I press p, I am presented with a numbered sorted list of all running containers to choose from :)
 

aaron

Proxmox Staff Member
Staff member
Jun 3, 2019
1,753
230
63
Thanks for sharing that. I marked the thread as tutorial.
 
  • Like
Reactions: leodom

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE 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 your own in 60 seconds.

Buy now!