Saturday, May 18, 2013

How to SSH to Virtual Ubuntu

1. Check if SSH daemon/server is running
ps -A |grep sshd
2. if not, then go install it:
sudo apt-get install openssh-server
3. sudo service ssh restart
4. if alternative port for ssh is needed such as 443 or 80 (for instance: ssh behind proxy), modify the file /etc/ssh/sshd_config

Note: No need for adding port exceptions into  iptables of Ubuntu. For Redhat, this may be required.
Also, when editing the file /etc/sudoers if running into this error:
error:
----------
sudo: >>> /etc/sudoers: syntax error near line 25 <<<
sudo: parse error in /etc/sudoers near line 25
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
-----------
the fix for it is to run:
pkexec visudo 
Best way is to use visudo
 

No comments:

Post a Comment