Let \(\mathcal S\) be the space of all complex sequences. If \(\{ \beta _n\}_{n=0}^\infty \in \mathcal S\) , the Rhaly operator \(R_{\{ \beta _n\} }\) is defined in \(\mathcal {S}\) as follows: If \(\{ a_n\}_{n=0}^\infty \in \mathcal S\) , then \(R_{ \{\beta _n\} }(\{ a_n\}_{n=0}^\infty )\,=\,\left\{ \beta _n\sum _{k=0}^na_k\right\} _{n=0}^\infty .\) Rhaly operators are a natural generalization of the Cesàro operator. We characterize the sequences \(\{ \beta _n\}_{n=0}^\infty\) for which the operator \(R_{\{ \beta _n\} }\) is either bounded or compact on the space \(\ell ^p\) for any \(p\in (1, \infty )\) .