Newest Update
The flag is -p portnumber
but I can't get into root, got (publickey, permission denied)
I sign up for a vps on digital ocean.
Currently going through this tutorial https://coderwall.com/p/yz8cha and this railscast http://railscasts.com/episodes/335-deploying-to-a-vps
I made a new user inside the vps but this user doesn't have sudo priveledge
when I do cap deploy:setup according to the guide I am getting this
judy is not in the sudoers file. This incident will be reported.
failed: "sh -c 'sudo -p '\\''sudo password: '\\'' ln -nfs /home/judy/apps/lintong/current/config/nginx.conf /etc/nginx/sites-enabled/lintong'" on 192.241.241.204
I changed the port to 888 according to the guide and now I can't ssh into the server
when I do ssh root@ipaddress
or ssh judy@ipaddress
its trying to connect to port 22
1st question how do I pass in a field to when I ssh into the vps with a port option of 888?
2nd question How do I give judy sudo rights? according to coderwall's tutorial I should do this
visudo
then
add username ALL=(ALL:ALL) ALL
but I think I did it before and it didn't work?
For recent Ubuntu/Debian versions, don't modify /etc/sudoers
,
but add the user to to the sudo
group in /etc/group
.
sudo usermod -a -G sudo judy
or
sudo vigr
(and sudo vigr -s
)
To use ssh with a specific port, use -p 888
: i.e., ssh -p 888 judy@ipaddress
(Note that if you ever need to set a port with scp, you use a capital -P
instead.)
Answering just one question:
ssh -p 888 root@ipaddress
should allow you to log in when ssh is listening on port 888
. Not sure what is wrong with the second part... can you show the judy
entry from /etc/sudoers
?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With