Putty shortcut and ssh to another server question, possible in bash?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Putty shortcut and ssh to another server question, possible in bash?
# 1  
Old 08-18-2011
Putty shortcut and ssh to another server question, possible in bash?

Hi,

sorry if this is the wrong forum for this question but I couldnt spot another obvious forum for it.

I have a windows shortcut which opens up a saved session in putty. From this session I then ssh to another remote server. I was wondering is there a way that I can either edit my shortcut so that it brings up my saved session then automatically runs the ssh command to the other server, or is there a way I can do it through my bash profile or something?

Just to add, I have to go via the saved session to connect to the other server because of networking reasons.

Thanks for your help.
# 2  
Old 08-18-2011
yeah you can do by bash startup files. test it out !!
# 3  
Old 08-18-2011
Hi, I did think about it a bit more but then I realised, if everytime I log onto remote server1 and its bashprofile tells me to ssh2 to remote server2, then I wont be able to actually log into server1...as it will keep forwarding me on.

Hmm, maybe I can make an alias shortcut for the ssh command to remote server 2.

Quote:
Originally Posted by thegeek
yeah you can do by bash startup files. test it out !!
# 4  
Old 08-18-2011
Whatever those networking reasons are must be among the settings for that PUTTY option.

PUTTY, being an interactive graphical terminal, isn't meant to be automated in that fashion. For that, there's it's companion PLINK utility.
# 5  
Old 08-18-2011
Hi Corona, I think the reason is that there is some sort of firewall on server2 so it will only accept connections from server1 rather than directly from my computer.

I have got a shortcut on putty which automatically loads up server1 when i run it but I dont think I can add more arguments to the shortcut so it opens server1 then server2.

I've found some people use alias for ssh shortcuts though. I might try that.

Quote:
Originally Posted by Corona688
Whatever those networking reasons are must be among the settings for that PUTTY option.

PUTTY, being an interactive graphical terminal, isn't meant to be automated in that fashion. For that, there's it's companion PLINK utility.
# 6  
Old 08-18-2011
Quote:
Originally Posted by newb1000
I have got a shortcut on putty which automatically loads up server1 when i run it but I dont think I can add more arguments to the shortcut so it opens server1 then server2.
That's what I mean. The PUTTY terminal emulator is interactive, not meant to be automated. They made the PLINK utility to do automatic things, but it's not graphical.
Quote:
I've found some people use alias for ssh shortcuts though. I might try that.
That'd make things simpler at least. just 'doserver2' instead of ssh username@server2 thing1 thing2 ...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Find number of ACTIVE SSH putty sessions, excluding where the user hopped on to a diff server

Hi - If iam logged on to server A, on 4 putty windows using SSH ... and out of these 4 logged-in sessions, in one of the sessions if i did SSH from server A to server B; i would now have 4 putty windows sessions ... of which 3 are actively logged on to Server A while 1 putty window is actively... (2 Replies)
Discussion started by: i4ismail
2 Replies

2. Shell Programming and Scripting

Query regarding PuTTY SSH Tunneling

I have a process running on my local server. http://dev.techx.com:6060/proct I wish to block port 6060 and expose port 7777 to the outside world. I block port 6060 and open port 7777 on the firewall. What should be the PuTTY Settings -> Connection -> SSH -> Tunnels 1. Destination ... (3 Replies)
Discussion started by: mohtashims
3 Replies

3. UNIX for Advanced & Expert Users

Making SSH coonection through putty

Hi Folks , I am using putty to connect to a unix box machine the issue is that every time i need to enter the credentials of the servers (unix box) , please advise is there any way i can configure putty so that only i need to eneter the user id of the server and password is automatically pass... (1 Reply)
Discussion started by: n4noida
1 Replies

4. Windows & DOS: Issues & Discussions

Method to run a shell script using shortcut key in keyboard with out logging to putty

Dear All, I want to run a shell script with out logging to putty but configuring it to a keyboard short cut it windows PC. Can this be done? I want this to rename a log in a specified folder in a system Thanks (8 Replies)
Discussion started by: Chi_SL
8 Replies

5. SuSE

Unable to putty using ssh at port 22

I installed linux on one of my system and assigned valid network ip to it. I am able to connect to net properly. But when I try to putty this system from another system using ssh at port 22 then it gives me connection timed out error. When I ping the system it responds fine but still unable to... (2 Replies)
Discussion started by: rupeshkp728
2 Replies

6. Solaris

how to get to openboot through ssh putty?

hi, iīm trying to get openboot through ssh putty, could you tell me the way because i donīt have a sun keyboard.. thanks... (3 Replies)
Discussion started by: pabloli150
3 Replies

7. UNIX for Dummies Questions & Answers

connecting to an ssh session with putty/bash.

Hi, sorry if this is the wrong forum for this question but I couldnt spot another obvious forum for it. I have a windows shortcut which opens up a saved session in putty. From this session I then ssh to another remote server. I was wondering is there a way that I can either edit my shortcut... (2 Replies)
Discussion started by: newb1000
2 Replies

8. OS X (Apple)

Copy entire line in bash (terminal) - keyboard shortcut

how can I do that? I can paste a line with ctrl+p; but I dont know how to copy it? ctrl+y - just deletes etc. (2 Replies)
Discussion started by: c_lady
2 Replies

9. Red Hat

Free SSH Client other than PUTTY

Is there any Better FREE SSH client similar to Secure CRT ? We are working on cluster db servers. PROD/DEV/UAT/QA/TEST server hostnames are just one letter differences. it always confuse me to which one I am logging in. So I am looking for a free SSH client, for windows where I can store... (4 Replies)
Discussion started by: johnveslin
4 Replies

10. Solaris

SSH with Putty

I've been trying to setup my SunBlade as an SSH server. I configured the sshd_config file, but I cannot get the keys to exchange properly. I generate a key pair in Putty on my laptop (the host, running Win2K), exported the Private key as OpenSSH and then copied the public key to the a file I... (3 Replies)
Discussion started by: AJA
3 Replies
Login or Register to Ask a Question