Remote port access - ssh

I was working on the intranet at work on a virtual machine set up for my project and at some point I have to access it by putting localhost:port number and it works.
Right now I'm home working on it and I can download/upload, use SSH, etc. But I cannot access the same port by putting URL:port number while everything else works.
I'm new to all this so please excuse my ignorance on what could be a very basic subject.<
P.S. the system administrator supposedly gave me full and complete access to the machine, including giving me full firewall permissions. I also have root access via SSH if needed.
THANK YOU!

Try running
ssh -L port:localhost:port remotehost
and then accessing localhost:port as if you were at work.
(n.b. you don't need root access.)

Related

How can I change the port for Webmin access?

I'm managing a Rails website that relies on MySQL tables. I used to be able to access the tables with Webmin by going to xxx.xxx.xxx.xxx:10000 . At some point, I lost the ability to access it this way.
I'm not great with SSH, but I was able to SSH into my website as a general user. Then, I switched to Root user. Then, I ran this command to restart my Webmin:
svcadm restart webmin
It seemed to accept the command, but I'm not really sure how to check. Anyway, I started getting a new error message when I tried to access Webmin through my browser:
ERR_SSL_VERSION_OR_CIPHER_MISMATCH
The website uses a connection with Cloudflare. My guess was that this could be the problem since Cloudflare doesn’t support port 10000. I tried deactivating Cloudflare, but it didn't resolve the problem.
Still, I figured I might need to use SSH to change the port for Webmin access just in case. I found a source that suggested how to do it, and it starts with SSH. I went in through SSH and I switched to Root user. Then, I ran this command:
/etc/webmin/miniserv.conf
And it tells me
bash /etc/webmin/miniserv.conf Permission denied
How can I get past this step? Am I headed the wrong direction to get access back to Webmin? Thank you!

Connect to Windows server with ssh with keys

I would like to connect to a Windows server via SSH with private and public key from my local Windows machine.
The problem is that I can not figure out how and am asked to enter the password every time.
Eventually I want to setup remote coding with vs code but as the ssh program faces the same problem as in VS code I think we can leave VS code out of the picture.
Generally the connection to the server is working. So if I type ssh {myuser}#{servername} I am prompted to write my password and afterwards the console is connected to the server.
Now I would like to set it up in a way that I do not need to write my password every time, there for I setup public and private key following this tutorial.
But the system still ask my for a password each time. Does anyone know what the problem might be?
I would guess that the permissions might be an issues. In the link listed above they mentioned that I should set the permissions to 700 for the .ssh folder and 640 for the authorized_keys file. As Windows does not hove the chmod command (or at least it does not seem to change the permissions) this could be the problem.
I have also put the public key in the authorized_keys file of the .ssh folder of the user I am using.
Also as the copying with cat and | did not work I moved the files there manually but otherwise is sticked to the tutorial.
Does anyone know what the issue is?
Furthermore I managed to connect both the server and the client to a bit bucket server using ssh key with out a problem.

Unable to connect to phpMyAdmin via SSh tunnel on Bitnami LAMP stack

I've tried searching for a solution to my problem both here and elsewhere online but I've come up empty, so I'm hoping someone can help. I must initially point out this issue has shown that this area is a complete blind spot for me, so I'm sorry if I'm missing something blatantly obvious, or I'm not explaining thoroughly enough.
I'm trying to access phpMyAdmin on a Bitnami LAMP stack via SSH tunnel, as per guide here: https://docs.bitnami.com/virtual-machine/components/phpmyadmin/. I seem to be able to establish the SSH tunnel, and everything looks correct in the PuTTY event log in terms of opening connection for forwarding, etc, but when I try to navigate to http://127.0.0.1:8888/phpmyadmin in a browser as stated in the guide, I am returned the error 'This site can’t be reached. 127.0.0.1 refused to connect.' After I receive this error I check the PuTTY event log and it shows 'forwarded port closed'. Is anyone able to provide me with some troubleshooting steps I can go through or possible solutions for what the problem may be please? Again, if I've not provided enough information please ask and I'll do my best to update what I can.
For background, I am the nearest thing to an IT lead for a GP and this LAMP stack is used for an online system accessed by both patients and staff for a specific health condition. It was independently created by a GP who has since left the practice, but before doing so he imparted onto me what we thought to be enough information/instruction to keep the system "ticking over" until we found a developer to produce a new one (I'm struggling to get in touch with said GP, so currently asking for their help isn't an option). It is a Bitnami LAMP stack created in Microsoft Azure, and has recently developed a SMTP authentication error whenever a patient/staff member needs to request a new or reset an existing password. I am attempting to access phpMyAdmin to check/reconfigure the SMTP server settings in the hopes of rectifying the situation. I do have some systems experience, previously working as a System Analyst/Technician for a hospital, but as I previously stated this area (servers, etc.) are a bit of a blind spot.
Many thanks to anyone willing and able to help.
Bitnami Engineer here,
It seems that the SSH tunnel was not properly created and that's why you can't access phpMyAdmin now. You can try to reconfigure the port forwarding configuration again or you can edit the Apache's configuration to allow remote requests from your IP to the phpMyAdmin application. To do so:
Edit the /opt/bitnami/conf/bitnami/phpmyadmin.conf file and substitute the Require local line with Require ip YOUR_PUBLIC_IP.
If you do not know your public IP, you can access http://myip.bitnami.com to get that information
Restart Apache and access phpMyAdmin using http://MACHINE_IP_ADDRESS/phpmyadmin

Unable to access my webserver (virtual machine, Ubuntu 14.10) through browser

I have setup a Virtual Machine on my Windows 7 system (Ubuntu 14.10). It looks like Apache, MySql and PHP have been installed successfully. If I ran
curl -l 127.0.0.1
I see the website in my console.
But if I hit this address in my browser I just get "This web page is not available".
VM->Settings->Network: I've selected "Bridged Adapter".
Have anyone any ideas what could cause the issue? Any help will be much appreciated. Thank you.
If you are trying to access to 127.0.0.1 it's not gonna work. You have two solutions :
With a bridged interface, go to ubuntu, open a terminal and type ifconfig (it's possible you have to be root for that). Then use the ip displayed.
You can add an host only interface and do the same thing

Can I setup CVSROOT with remote access?

I created a cvs repository in my school network account, I would love to have the access to it using my local machines at home. I tried, at local, setting CVSROOT variable to be "myUserID#schoolServer:/u/myUserId/cs/csvroot", but it complains, about the $CVSROOT value, when I tried to use it. I also tried "cvs -d " option, but still not working. What can I do?
thank you
Try setting CVS_RSH to ssh (or whatever you use to access schoolServer.).