Is it safe to type a password in a VNC client connected to a server to access another server?

I am using VNC GUI client from my Desktop to connect to a remote (ubuntu) server, say S1. From the remote server (S1), I will be logging into another server (say S2) via SSH. Via VNC client, I will be typing in the SSH password of S2 on putty running on S1 to gain access to S2. Is this a safe way of doing things?