# kubectl exec vs. SSH: Comparing Remote Command Execution and Authentication

DevFeed: [kubectl exec vs. SSH: Comparing Remote Command Execution and Authentication](<https://devfeed.tech/articles/what-is-kubectl-exec-how-does-it-work-29879.md>)

Original publisher: [Read original article](<https://goteleport.com/blog/ssh-vs-kubectl/>)

Author: info@goteleport.com (Andrew Lytvynov)

Published: 2020-08-12T00:00:00Z

Content type: comparison

Language: en

Sources: [Teleport](<https://devfeed.tech/sources/teleport.md>)

Topics: [kubectl](<https://devfeed.tech/topics/kubectl.md>), [OpenSSH](<https://devfeed.tech/topics/openssh.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>), [Security](<https://devfeed.tech/topics/security.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [kubectl](<https://devfeed.tech/tags/kubectl.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [openssh](<https://devfeed.tech/tags/openssh.md>), [security](<https://devfeed.tech/tags/security.md>), [ssh](<https://devfeed.tech/tags/ssh.md>)

## AI overview

This comparison examines kubectl exec and SSH as ways to run commands or open remote shells. It contrasts SSH's customizable authentication and fleet-management challenges with kubectl's stronger authorization integration and more opaque authentication.

## Source excerpt

SSH is architecturally set, but higher-level software can learn from Kubernetes about centralized config when managing a fleet of machines.