SSH port forwarding [closed] - linux

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I'm using SSH port forwarding to connect to Windows Remote Desktop from my Linux machine, like this:
ssh -L 50000:192.0.2.10:3389 user#example.com
rdesktop -f localhost:50000 -u user -p password
Now, the first command opens the remote command line on my terminal, so I have to open another terminal to issue the second one. How can I make ssh go on the background so I wouldn't have to open a new terminal?

You can try ssh with -Nf flags. man ssh for more information.

Related

Can I use ssh to login another host and automatically "su" to another user? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
E.g, each time I have start from my mac:
ssh myself#192.168.100.101 to a linux server server and su oracle, and type my password. I wish to accelerate this routine by using some alias, which do the ssh login and su user at the same time.
I know ssh command can do remote command line and quit. But that's not my requirement: I don't wish ssh login/execute/return, I want it to switch user and I start to work.
Any command line option could help on this?
Thanks a lot.
ssh -t myself#192.168.100.101 "su oracle"
-t
Force pseudo-terminal allocation. This can be used to execute
arbitrary screen-based programs on a remote machine, which can be very
useful, e.g. when implementing menu services. Multiple -t options
force tty allocation, even if ssh has no local tty

Command to remotely restart another computer on same network, In Windows and Linux? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
What command do I use to remotely restart another computer on our network, through command prompt with windows? And what is this same command in Linux terminal?
Google should sort u out.
Here's some possibilities assuming you wish to reboot a linux machine (either local or remote):
Local
(as root)
/sbin/shutdown -r now
or
$ sudo reboot
Remote
You will definitely need to get access to the remote machine before you can reboot it. So, the best bet is grabbing ssh or putty (for windows).
With ssh, you can reboot a remote linux machine like this:
$ ssh root#remote-server.com /sbin/reboot
or
$ ssh root#remote-server.com /sbin/shutdown -r now
Enjoy!
More ideas discussed here

ssh username#hostname to ssh hostname [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
I have an account on my college server and I access it on linux terminal using
ssh {username}#{hostname}.com
I was Wondering if there is a way to access this account only by typing.
ssh {hostname}
Put this into your $HOME/.ssh/config:
Host somealias
HostName example.com
Port 22
User myuser
You can then type ssh somealias and it will actually do a ssh -p 22 myuser#example.com
Like the comments say: Yes, if username is the same on both client and server

PuTTY : run knit when putty logs in [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
When I log onto remote linux host with putty ssh, it asks me to run "knit -f" (once a day)
if I don't run that command it starts asking me for password for all the git commands "git pull"
I want to know why does this happen, and if there is a way to automatically run this command every time my putty session starts.
You can add the command to the startup file of your shell on the linux host (e.g. .bash_profile if you use bash.)

How to modify .bash_login remotely? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I did something stupid which was adding the command exit 0 to .bash_login.
Now i'm stuck since whenever i try logging in, it just exits automatically.
Any ideas on how to resolve this? I'm currently using a windows PC to ssh to a linux plug computer.
ssh user#host "/bin/bash --noprofile"
See manpages for ssh and bash to see how this works. May need some modifications-- for example, if bash isn't in /bin on the remote machine. You will need a command-line ssh client, but I believe one is available for Cygwin on Windows.
After that, you should have a usable shell so you can fix your .bash_login.
Can you start a different shell?
ssh user#host tcsh
Then, in the different shell, fix or rename the file.

Resources