ssh 로 로그인 할 뿐만 아니라 명령어를 보내고 값을 바로 표시할 수도 있다

ssh username@hostname 'command'

사용자 인터랙션이 필요한 경우에는 -t 플래그를 준다.

ssh -t username@hostname 'command'

포트 번호가 별도로 지정된 경우 -p 플래그 뒤에 포트 번호를 준다.

ssh -p portnumber -t username@hostname 'command'

매번 간단한 명령어 실행시키려고 로그인하기 귀찮았는데 좋은 방법이 있었다.


참조