Pneumonia can be contagious if caused by viruses or bacteria. Washing your hands and covering your mouth when coughing can help prevent the spread of pneumonia. Pneumonia vaccines are recommended for ...