connecting to an ssh session with putty/bash.


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers connecting to an ssh session with putty/bash.
# 1  
Old 08-18-2011
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 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
You can't harm anything, why don't you try it out? Smilie

Edit the link to putty on your desktop and add the IP-address or name behind the putty.exe.
On the remote host, if bash is your shell, you can add something like
Code:
ENV=~/.bashrc

to your ~/.profile.
In the ~/.bashrc you can add
Code:
ssh yourremotehost

Then log out and in again, using the altered or new link on the desktop. Should work.
This User Gave Thanks to zaxxon For This Post:
# 3  
Old 08-18-2011
Thanks zaxxon,

I'm not sure I can do it on the puttyshortcut as I already have the session name of the server I connect to once putty runs. I need to then connect to another server after that one.

The bash way might work, I'll google some details on it and try it out Smilie

Quote:
Originally Posted by zaxxon
You can't harm anything, why don't you try it out? Smilie

Edit the link to putty on your desktop and add the IP-address or name behind the putty.exe.
On the remote host, if bash is your shell, you can add something like
Code:
ENV=~/.bashrc

to your ~/.profile.
In the ~/.bashrc you can add
Code:
ssh yourremotehost

Then log out and in again, using the altered or new link on the desktop. Should work.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Putty session freezes when sudo

I have a Windows batch file with the below entry for auto login. putty.exe -ssh user1@10.10.10.7 -pw passwd1 -m command.txtcommnd.txt contains the below entries pwd sudo su - user2Switching from user1 to user2 does not require any password . Output just prints the pwd and not sudo When i... (6 Replies)
Discussion started by: mohtashims
6 Replies

2. Windows & DOS: Issues & Discussions

Connecting to UNIX from Windows without using putty

Hi Is there any command which we can try connecting unix from windows without using any third party tool. Thanks in advance KVB (9 Replies)
Discussion started by: bikky6
9 Replies

3. UNIX for Dummies Questions & Answers

Restarting a putty session

Hi, Is there any way to refresh the session(for the profile file changes get reflect) in putty? I am tired of closing reopening putty. Thanks, Pandeeesh CTRL + Q to Enable/Disable GoPhoto.it (4 Replies)
Discussion started by: pandeesh
4 Replies

4. Solaris

M5000 XSCF Console disconnecting when putty session is closed

Hi, I would appreciate some help. I remotely access, across a VPN, an M5000 and when I connect to the XSCF I can then access the OS using console -d0 and then I can get to the console. The problem I have is that I need to run something which will take many hours and I can't run it in the... (6 Replies)
Discussion started by: giles.cardew
6 Replies

5. Emergency UNIX and Linux Support

Nohup process getting killed after closing PUTTY session

I am running a process in nohup . nohup getkeys.ksh 132 > 132.out & When I close the putty terminal,The process is getting killed . default_signal_handler called for signal no: 1 Is there a way to keep the process running even If I close the terminal (2 Replies)
Discussion started by: prasperl
2 Replies

6. Shell Programming and Scripting

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... (5 Replies)
Discussion started by: newb1000
5 Replies

7. UNIX for Dummies Questions & Answers

Putty Session Timeout

Hi, I had add the following line into .profile and .bash_profile for the timeout session to avoid putty close automatically : timeout=10800 However, i still keep encounter session time out every after 60 seconds. Can anyone please help advice. Many Thanks! (2 Replies)
Discussion started by: wancy
2 Replies

8. AIX

Enabling color for putty session

Hi Everyone: Is there any way to enable colors through putty for a session into AIX? I've tried to set the TERM variable to xterm-256color but it doesn't work having a 8-color terminal would be okay for me thanks in advance (5 Replies)
Discussion started by: edgarvm
5 Replies

9. Shell Programming and Scripting

starting a bash session as child process to another bash session from a process

Hi I want to do something that might sound strange. I have a code that in written in C and is executed at startup (it's a custom process). It occasionally calls some bash scripts. The process doesn't have any terminal associated with it. One thing I don't know how to do is to start a... (5 Replies)
Discussion started by: alirezan
5 Replies

10. UNIX for Advanced & Expert Users

Putty session

Dear all, We have a practice of getting user's passwords expired after 60 days and a strong password policy. When a user tries to enter a password which is not compliant to the policy which is set putty exists without giving any feedback to the user. Below is something i captured from the... (3 Replies)
Discussion started by: earlysame55
3 Replies
Login or Register to Ask a Question